fixing php 5.3.3 error:

Undefined variable: this
lib/private/appframework/dependencyinjection/dicontainer.php:92
This commit is contained in:
Thomas Müller 2013-10-22 09:29:17 +02:00
parent d86508e36d
commit 7f1432600c
1 changed files with 3 additions and 2 deletions

View File

@ -88,8 +88,9 @@ class DIContainer extends SimpleContainer implements IAppContainer{
/**
* Middleware
*/
$this['SecurityMiddleware'] = $this->share(function($c){
return new SecurityMiddleware($this, $c['Request']);
$app = $this;
$this['SecurityMiddleware'] = $this->share(function($c) use ($app){
return new SecurityMiddleware($app, $c['Request']);
});
$middleWares = $this->middleWares;