From 34cf66110ea00e4bbfa4ad7d3619e40f4e8362cb Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 5 Sep 2019 18:10:07 +0100 Subject: [PATCH] see https://github.com/postfixadmin/postfixadmin/issues/251 - avoid things breaking if imap_open is not present --- model/MailboxHandler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index c34570e2..ca69b684 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -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;