]> source.dussan.org Git - nextcloud-server.git/commitdiff
fixing php 5.3.3 error:
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 22 Oct 2013 07:29:17 +0000 (09:29 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 22 Oct 2013 07:29:17 +0000 (09:29 +0200)
Undefined variable: this
lib/private/appframework/dependencyinjection/dicontainer.php:92

lib/private/appframework/dependencyinjection/dicontainer.php

index 81910df6990c5ae7d5bd9b59d85c17e21e78b0e0..0054b153f9105419cd44d8c2a22d0f9d3c9eae4f 100644 (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;