fixing php 5.3.3 error:

Undefined variable: this
lib/private/appframework/dependencyinjection/dicontainer.php:92
remotes/origin/stable6
Thomas Müller 13 years ago
parent d86508e36d
commit 7f1432600c
  1. 5
      lib/private/appframework/dependencyinjection/dicontainer.php

@ -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;

Loading…
Cancel
Save