simplify check

This commit is contained in:
euromark 2012-10-09 12:24:10 +02:00
parent 2cff67184f
commit 0197700e4f

View file

@ -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;