mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 17:42:41 +00:00
Merge pull request #892 from dereuromark/router-fix
avoid offset -1 error on tests etc
This commit is contained in:
commit
2e15689d19
1 changed files with 1 additions and 1 deletions
|
@ -633,7 +633,7 @@ class Router {
|
||||||
* @return array Parameter information
|
* @return array Parameter information
|
||||||
*/
|
*/
|
||||||
public static function getParams($current = false) {
|
public static function getParams($current = false) {
|
||||||
if ($current) {
|
if ($current && self::$_requests) {
|
||||||
return self::$_requests[count(self::$_requests) - 1]->params;
|
return self::$_requests[count(self::$_requests) - 1]->params;
|
||||||
}
|
}
|
||||||
if (isset(self::$_requests[0])) {
|
if (isset(self::$_requests[0])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue