ZF-7399: Chain route does not match a chain with Zend_Controller_Router_Route wildcard

Issue Type: Bug Created: 2009-07-27T14:07:18.000+0000 Last Updated: 2009-08-03T10:48:40.000+0000 Status: Closed Fix version(s): Reporter: Geoffrey Tran (potatobob) Assignee: Ben Scholzen (dasprid) Tags: - Zend_Controller

Related issues: - ZF-6654



Chaining does not work with the normal Zend_Controller_Router_Route when wildcards are used

/user/:id/:action/* does not work because getMatchedPath() from the route is not returning the right matched path. It ignores the wildcard...

Fix is here: $matchedPath .= $path[$i] . $this->_urlDelimiter;

on Zend_Controller_Router_Route match()

<pre class="highlight">
                // If it's a wildcard, get the rest of URL as wildcard data and stop matching
                if ($this->_parts[$pos] == '*') {
                    $count = count($path);
                    for($i = $pos; $i < $count; $i+=2) {
                        $var = urldecode($path[$i]);
                        if (!isset($this->_wildcardData[$var]) && !isset($this->_defaults[$var]) && !isset($values[$var])) {
                            $this->_wildcardData[$var] = (isset($path[$i+1])) ? urldecode($path[$i+1]) : null;
                            $matchedPath .= $path[$i] . $this->_urlDelimiter;


Posted by Jason Webster (jasonistaken) on 2009-08-03T10:47:26.000+0000

Closed as duplicate of #ZF-6654

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.