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

Description

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()


                // 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;
                        }
                    }
                    break;
                }

Comments

Closed as duplicate of #ZF-6654