summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 81910df6990..0054b153f91 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/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;