diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-11 20:50:49 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-11 20:50:49 +0200 |
commit | 4af72a076d9796907bf48ee34de1ae29528b55df (patch) | |
tree | 17472dae974ddca3f982ed1fc247e087e1dae68c /lib | |
parent | 763da4258e14c782e9fba2cf522fa266acecf298 (diff) | |
download | nextcloud-server-4af72a076d9796907bf48ee34de1ae29528b55df.tar.gz nextcloud-server-4af72a076d9796907bf48ee34de1ae29528b55df.zip |
use references for middleware to fix problems on 5.3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appframework/dependencyinjection/dicontainer.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index beba71052f8..e478225a53d 100644 --- a/lib/private/appframework/dependencyinjection/dicontainer.php +++ b/lib/private/appframework/dependencyinjection/dicontainer.php @@ -92,11 +92,12 @@ class DIContainer extends SimpleContainer implements IAppContainer{ return new SecurityMiddleware($app, $c['Request']); }); - $this['MiddlewareDispatcher'] = $this->share(function($c) { + $middleWares = &$this->middleWares; + $this['MiddlewareDispatcher'] = $this->share(function($c) use (&$middleWares) { $dispatcher = new MiddlewareDispatcher(); $dispatcher->registerMiddleware($c['SecurityMiddleware']); - foreach($this->middleWares as $middleWare) { + foreach($middleWares as $middleWare) { $dispatcher->registerMiddleware($c[$middleWare]); } |