diff options
Diffstat (limited to 'lib/private/appframework/dependencyinjection/dicontainer.php')
-rw-r--r-- | lib/private/appframework/dependencyinjection/dicontainer.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index 81910df6990..e2ea974e104 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -24,7 +24,7 @@ namespace OC\AppFramework\DependencyInjection; -use OC\AppFramework\Http\Http; +use OC\AppFramework\Http; use OC\AppFramework\Http\Request; use OC\AppFramework\Http\Dispatcher; use OC\AppFramework\Core\API; @@ -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; |