diff --git a/elFinderApi.php b/elFinderApi.php index c882f1b..adbaf65 100644 --- a/elFinderApi.php +++ b/elFinderApi.php @@ -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) { @@ -43,4 +46,4 @@ public function __construct($opts, $plugins=[]) { } } -} \ No newline at end of file +}