Fix exception thrown during re-routing without parameters
This commit is contained in:
parent
8d29620350
commit
3beec6e102
|
@ -25,7 +25,12 @@ if (substr($ruri, 0, strlen($remove)) !== $remove) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$ruri = substr($ruri, strlen($remove));
|
$ruri = substr($ruri, strlen($remove));
|
||||||
list($path, $params) = preg_split('/\?/', $ruri, 2);
|
if (strpos($ruri, '?') === false) {
|
||||||
|
$params = '';
|
||||||
|
$path = $ruri;
|
||||||
|
} else {
|
||||||
|
list($path, $params) = preg_split('/\?/', $ruri, 2);
|
||||||
|
}
|
||||||
$ruriParts = preg_split('~/~', ltrim($ruri, '/'));
|
$ruriParts = preg_split('~/~', ltrim($ruri, '/'));
|
||||||
if (count($ruriParts) === 2 &&
|
if (count($ruriParts) === 2 &&
|
||||||
($ruriParts[0] === 'css' || $ruriParts[0] === 'js')
|
($ruriParts[0] === 'css' || $ruriParts[0] === 'js')
|
||||||
|
|
Loading…
Reference in New Issue