From 0197700e4fd054cdb8165a01d2b152af2f85c043 Mon Sep 17 00:00:00 2001 From: euromark Date: Tue, 9 Oct 2012 12:24:10 +0200 Subject: [PATCH] simplify check --- lib/Cake/Routing/Router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index 0d936f3d9..2a02570cd 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -633,8 +633,8 @@ class Router { * @return array Parameter information */ public static function getParams($current = false) { - if ($current && ($count = count(self::$_requests)) > 0) { - return self::$_requests[$count - 1]->params; + if ($current && self::$_requests) { + return self::$_requests[count(self::$_requests) - 1]->params; } if (isset(self::$_requests[0])) { return self::$_requests[0]->params;