diff -r 5e7a0fedabdf -r 877f952ae2bd web/lib/Zend/Controller/Router/Rewrite.php --- a/web/lib/Zend/Controller/Router/Rewrite.php Thu Mar 21 17:31:31 2013 +0100 +++ b/web/lib/Zend/Controller/Router/Rewrite.php Thu Mar 21 19:50:53 2013 +0100 @@ -15,8 +15,8 @@ * @category Zend * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - * @version $Id: Rewrite.php 23362 2010-11-18 17:22:41Z bittarman $ + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @version $Id: Rewrite.php 24593 2012-01-05 20:35:02Z matthew $ * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -31,7 +31,7 @@ * * @package Zend_Controller * @subpackage Router - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://manuals.rubyonrails.com/read/chapter/65 */ @@ -381,7 +381,7 @@ // Find the matching route $routeMatched = false; - + foreach (array_reverse($this->_routes, true) as $name => $route) { // TODO: Should be an interface method. Hack for 1.0 BC if (method_exists($route, 'isAbstract') && $route->isAbstract()) { @@ -450,6 +450,11 @@ */ public function assemble($userParams, $name = null, $reset = false, $encode = true) { + if (!is_array($userParams)) { + require_once 'Zend/Controller/Router/Exception.php'; + throw new Zend_Controller_Router_Exception('userParams must be an array'); + } + if ($name == null) { try { $name = $this->getCurrentRouteName(); @@ -458,14 +463,14 @@ } } - // Use UNION (+) in order to preserve numeric keys + // Use UNION (+) in order to preserve numeric keys $params = $userParams + $this->_globalParams; $route = $this->getRoute($name); $url = $route->assemble($params, $reset, $encode); if (!preg_match('|^[a-z]+://|', $url)) { - $url = rtrim($this->getFrontController()->getBaseUrl(), '/') . '/' . $url; + $url = rtrim($this->getFrontController()->getBaseUrl(), self::URI_DELIMITER) . self::URI_DELIMITER . $url; } return $url;