diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-06 21:52:26 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 15:51:12 +0200 |
commit | 459ae6d94af6bd8c20ecb0ad09c6649764817ada (patch) | |
tree | 8de03c23f98b03e795f9b7d2d8e581e2fb7479f8 /lib | |
parent | 8b0051eb4005522fef2d92f0a18ffaea673bc4e4 (diff) | |
download | nextcloud-server-459ae6d94af6bd8c20ecb0ad09c6649764817ada.tar.gz nextcloud-server-459ae6d94af6bd8c20ecb0ad09c6649764817ada.zip |
User proper anonymous function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Route/Route.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php index 3a953af9011..c25d08e8bc2 100644 --- a/lib/private/Route/Route.php +++ b/lib/private/Route/Route.php @@ -148,11 +148,12 @@ class Route extends SymfonyRoute implements IRoute { * @return void */ public function actionInclude($file) { - $function = create_function('$param', - 'unset($param["_route"]);' - .'$_GET=array_merge($_GET, $param);' - .'unset($param);' - .'require_once "'.$file.'";'); + $function = function($param) use ($file) { + unset($param["_route"]); + $_GET=array_merge($_GET, $param); + unset($param); + require_once "'.$file.'"; + } ; $this->action($function); } } |