Permalink
Browse files

Fix reject empty call

  • Loading branch information...
1 parent 20ef244 commit 78328fcc1156f2aba8a6e0eb9613bd9d895e8dc4 @cdujeu cdujeu committed Oct 17, 2016
Showing with 7 additions and 3 deletions.
  1. +7 −3 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);

0 comments on commit 78328fc

Please sign in to comment.