diff --git a/cake/libs/router.php b/cake/libs/router.php index e122d497c..5ea3d13da 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -246,7 +246,7 @@ class Router extends Object { function parse($url) { $_this =& Router::getInstance(); $_this->__connectDefaultRoutes(); - $out = array(); + $out = array('pass'=>array()); $r = $ext = null; if ($url && strpos($url, '/') !== 0) { diff --git a/cake/tests/cases/libs/router.test.php b/cake/tests/cases/libs/router.test.php index cd404dccd..f47a888be 100644 --- a/cake/tests/cases/libs/router.test.php +++ b/cake/tests/cases/libs/router.test.php @@ -228,7 +228,7 @@ class RouterTest extends UnitTestCase { $this->router->parseExtensions(); $result = $this->router->parse('/posts.rss'); - $expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'rss')); + $expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'rss'), 'pass'=> array()); $this->assertEqual($result, $expected); $result = $this->router->parse('/posts/view/1.rss'); @@ -246,11 +246,11 @@ class RouterTest extends UnitTestCase { $this->router->parseExtensions('rss', 'xml'); $result = $this->router->parse('/posts.xml'); - $expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'xml')); + $expected = array('controller' => 'posts', 'action' => null, 'url' => array ('ext' => 'xml'), 'pass'=> array()); $this->assertEqual($result, $expected); $result = $this->router->parse('/posts.atom?hello=goodbye'); - $expected = array('controller' => 'posts.atom', 'action' => null); + $expected = array('controller' => 'posts.atom', 'action' => null, 'pass'=> array()); $this->assertEqual($result, $expected); $this->router->reload();