Browse Source

ZF-3726, ZF-10681, Applying patches from Jurian

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@23361 44c647ce-9c0f-0410-b52a-842ac1e357ba
bittarman 15 years ago
parent
commit
127d83dd59
1 changed files with 2 additions and 2 deletions
  1. 2 2
      library/Zend/Controller/Router/Rewrite.php

+ 2 - 2
library/Zend/Controller/Router/Rewrite.php

@@ -95,7 +95,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract
             require_once 'Zend/Controller/Router/Route/Module.php';
             require_once 'Zend/Controller/Router/Route/Module.php';
             $compat = new Zend_Controller_Router_Route_Module(array(), $dispatcher, $request);
             $compat = new Zend_Controller_Router_Route_Module(array(), $dispatcher, $request);
 
 
-            $this->_routes = array_merge(array('default' => $compat), $this->_routes);
+            $this->_routes = array('default' => $compat) + $this->_routes;
         }
         }
 
 
         return $this;
         return $this;
@@ -382,7 +382,7 @@ class Zend_Controller_Router_Rewrite extends Zend_Controller_Router_Abstract
         // Find the matching route
         // Find the matching route
         $routeMatched = false;
         $routeMatched = false;
         
         
-        foreach (array_reverse($this->_routes) as $name => $route) {
+        foreach (array_reverse($this->_routes, true) as $name => $route) {
             // TODO: Should be an interface method. Hack for 1.0 BC
             // TODO: Should be an interface method. Hack for 1.0 BC
             if (method_exists($route, 'isAbstract') && $route->isAbstract()) {
             if (method_exists($route, 'isAbstract') && $route->isAbstract()) {
                 continue;
                 continue;