I am creating a URL like so:
$this->view->url(array('sort' => array('param1','param2'));
Notice the array of params for 'sort'. This works fine when I am using the
standard router. If I use my own router, I always get an error:
$router->addRoute('controlleralias', new Zend_Controller_Router_Route(
':module/mycontrolleralias/:action/*',
array(
'module' => 'mymodule',
'controller' => 'mycontroller',
'action' => 'myaction'
)
));
urlencode() expects parameter 1 to be string, array given
#0 [internal function]: __lambda_func(Array)
#1 /library/Zend/Controller/Router/Route.php(398): urlencode(Array,
false, true)
#2 /library/Zend/Controller/Router/Rewrite.php(441):
Zend_Controller_Router_Route->assemble(Array, NULL, false, true)
#3 /library/Zend/View/Helper/Url.php(49):
Zend_Controller_Router_Rewrite->assemble(Array)
Why is this? If I do NOT use an array of params it works fine:
$this->view->url(array('sort' => 'param1'));
I am using Zend Framework 1.9.0
Am I doing something wrong, or is this a bug in the Zend Framework?
--
View this message in context:
http://www.nabble.com/URL-view-helper-does-not-support-array-params-when-using-Zend_Controller_Router_Route-tp25676284p25676284.html
Sent from the Zend Framework mailing list archive at Nabble.com.