Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simplify check

  • Loading branch information...
commit 0197700e4fd054cdb8165a01d2b152af2f85c043 1 parent 2cff671
@dereuromark dereuromark authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Routing/Router.php
View
4 lib/Cake/Routing/Router.php
@@ -633,8 +633,8 @@ public static function getRequest($current = false) {
* @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;
Please sign in to comment.
Something went wrong with that request. Please try again.