Skip to content

Commit

Permalink
Merge pull request #130 from scorpsan/patch-1
Browse files Browse the repository at this point in the history
Deprecated function with php7.2 #129
  • Loading branch information
MihailDev committed Jun 7, 2019
2 parents 3cc3001 + e0b6f81 commit adc705b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions elFinderApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public function __construct($opts, $plugins=[]) {
foreach ($plugin->bind as $cmd => $methods) {
$doRegist = (strpos($cmd, '*') !== false);
if (! $doRegist) {
$_getcmd = create_function('$cmd', 'list($ret) = explode(\'.\', $cmd);return trim($ret);');
//$_getcmd = create_function('$cmd', 'list($ret) = explode(\'.\', $cmd);return trim($ret);');
$_getcmd = function ($cmd) {
list($ret) = explode('.', $cmd);return trim($ret);
};
$doRegist = ($_reqCmd && in_array($_reqCmd, array_map($_getcmd, explode(' ', $cmd))));
}
if ($doRegist) {
Expand All @@ -43,4 +46,4 @@ public function __construct($opts, $plugins=[]) {

}
}
}
}

0 comments on commit adc705b

Please sign in to comment.