diff --git a/core/src/plugins/access.imap/ImapAccessWrapper.php b/core/src/plugins/access.imap/ImapAccessWrapper.php index c3c5243978..646ad77cc4 100644 --- a/core/src/plugins/access.imap/ImapAccessWrapper.php +++ b/core/src/plugins/access.imap/ImapAccessWrapper.php @@ -30,8 +30,6 @@ defined('AJXP_EXEC') or die( 'Access not allowed'); -function rejectEmpty($element){return !empty($element);} - /** * Plugin to browse a mailbox content (IMAP OR POP) * @package AjaXplorer_Plugins @@ -87,6 +85,12 @@ public static function getCurrentAttachmentsMetadata() return self::$attachmentsMetadata; } + private function rejectEmpty($element){ + return !empty($element); + } + + + public function stream_open($path, $mode, $options, &$opened_path) { // parse URL @@ -102,7 +106,7 @@ public function stream_open($path, $mode, $options, &$opened_path) $this->path = substr($parts["path"], 1); //$this->mailbox = "INBOX"; $pathParts = explode("/", $this->path); - $pathParts = array_filter($pathParts, "rejectEmpty"); + $pathParts = array_filter($pathParts, [$this, "rejectEmpty"]); if (count($pathParts) > 1) { $this->path = array_pop($pathParts); $this->mailbox = implode("/", $pathParts);