mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
simplify check
This commit is contained in:
parent
2cff67184f
commit
0197700e4f
1 changed files with 2 additions and 2 deletions
|
@ -633,8 +633,8 @@ class Router {
|
||||||
* @return array Parameter information
|
* @return array Parameter information
|
||||||
*/
|
*/
|
||||||
public static function getParams($current = false) {
|
public static function getParams($current = false) {
|
||||||
if ($current && ($count = count(self::$_requests)) > 0) {
|
if ($current && self::$_requests) {
|
||||||
return self::$_requests[$count - 1]->params;
|
return self::$_requests[count(self::$_requests) - 1]->params;
|
||||||
}
|
}
|
||||||
if (isset(self::$_requests[0])) {
|
if (isset(self::$_requests[0])) {
|
||||||
return self::$_requests[0]->params;
|
return self::$_requests[0]->params;
|
||||||
|
|
Loading…
Reference in a new issue