User proper anonymous function
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
8b0051eb40
commit
459ae6d94a
1 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue