[URLMAPPER] Fix small bug in URLMapper: a dynamic route might not exist even if a static one does
This commit is contained in:
parent
12172f08d7
commit
d9668a6d07
@ -169,8 +169,8 @@ class URLMapper
|
||||
throw new Exception(sprintf('No candidate paths for action "%s"', $action));
|
||||
}
|
||||
|
||||
if (array_key_exists($action, $this->reverse_dynamics)){
|
||||
$candidates = $this->reverse_dynamics[$action];
|
||||
|
||||
foreach ($candidates as $candidate) {
|
||||
list($tryArgs, $format, $paramNames) = $candidate;
|
||||
|
||||
@ -201,9 +201,10 @@ class URLMapper
|
||||
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists($action, $this->reverse_statics)) {
|
||||
$candidates = $this->reverse_statics[$action];
|
||||
|
||||
foreach ($candidates as $candidate) {
|
||||
list($tryArgs, $tryPath) = $candidate;
|
||||
|
||||
@ -224,6 +225,7 @@ class URLMapper
|
||||
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
// failure; some reporting twiddles
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user