Issues

ZF-12072: Zend_Controller_Action_Helper_Url doesn't encode arrays

Description

$_POST decodes correctly myvar%5B0%5D=1. This is returned from Zend_Request::getParam correctly:

Array( 0 => 1 )

when Zend_Controller_Action_Helper_Url::simple($module, $controller, $action, array('myvar' => array(0 => 1))); is called it triggers an E_WARNING because urlencode isn't able to encode arrays.

i believe this can be easily fixed using http_build_query in Zend_Controller_Action_Helper_Url

Comments

It appears that you probably expected the url helper to produce the query string for your url, but this is not the intent of the component, it is only for reversing a route to produce the path section of the url. to produce your query string, please use http_build_query as you mentioned above.

I am closing this, as there is no support for array parameters in routes at all, so this is just not going to be possible to implement in a sane way.