From e0b6f81518e4a472256b80ae79b4a738c5b5df59 Mon Sep 17 00:00:00 2001 From: Dzmitry Saniuk <32801067+scorpsan@users.noreply.github.com> Date: Thu, 6 Jun 2019 17:24:51 +0300 Subject: [PATCH] Update elFinderApi.php --- elFinderApi.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 +}