1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2026-01-12 22:51:27 +03:00

see https://github.com/postfixadmin/postfixadmin/issues/251 - avoid things breaking if imap_open is not present

This commit is contained in:
David Goodwin
2019-09-05 18:10:07 +01:00
parent 3551710b82
commit 34cf66110e

View File

@@ -661,6 +661,11 @@ class MailboxHandler extends PFAHandler {
return true;
}
if(!function_exists('imap_open')) {
trigger_error('imap_open function not present; cannot create_mailbox_subdirs');
return false;
}
if (!is_array($create_mailbox_subdirs)) {
trigger_error('create_mailbox_subdirs must be an array', E_USER_ERROR);
return false;