Issue Type: Bug Created: 2008-09-20T01:04:46.000+0000 Last Updated: 2008-11-13T14:10:19.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)
Reporter: Paul Tomlin (ptomli) Assignee: Felix De Vliegher (felixdv) Tags: - Zend_Controller
Related issues: Attachments:
When using assemble with the regex router, parameters are not encoded when the $encode param to assemble is true. $encode is not referenced at all in assemble. I've not been able to tell if this is intentional or not, so presuming it's a bug.
Patch:
--- library/Zend/Controller/Router/Route/Regex.php (revision 11434) +++ library/Zend/Controller/Router/Route/Regex.php (working copy) @@ -169,6 +169,12 @@ $mergedData = $this->_arrayMergeNumericKeys($mergedData, $matchedValuesMapped); $mergedData = $this->_arrayMergeNumericKeys($mergedData, $dataValuesMapped);
if ($encode) {
foreach ($mergedData as $key => &$value) {
$value = urlencode($value);
}
}
ksort($mergedData);
$return = @vsprintf($this->_reverse, $mergedData);
Posted by Felix De Vliegher (felixdv) on 2008-11-08T07:35:32.000+0000
Fixed in revision 12434. ZF-4335: (felixdv) Route_Regex::assemble() is ignoring $encode.
Thanks for reporting this bug!
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:19.000+0000
Changing issues in preparation for the 1.7.0 release.