OSDN Git Service

Fix the parameters for `attach` method of SplObjectStorage class
authorJefersson Nathan <admin@phpse.net>
Wed, 25 Jun 2014 16:33:12 +0000 (13:33 -0300)
committerJefersson Nathan <admin@phpse.net>
Wed, 25 Jun 2014 16:33:12 +0000 (13:33 -0300)
src/PHPRouter/Router.php

index aa0d5f6..a085ac6 100755 (executable)
@@ -154,7 +154,7 @@ class Router
     {
         $collection = new RouteCollection();
         foreach ($config['routes'] as $name => $route) {
-            $collection->attach($name, new Route($route[0], array(
+            $collection->attach(new Route($route[0], array(
                 '_controller' => str_replace('.', '::', $route[1]),
                 'methods' => $route[2]
             )));