Permalink
Browse files

Merge pull request #892 from dereuromark/router-fix

avoid offset -1 error on tests etc
  • Loading branch information...
2 parents 33a879f + 0197700 commit 2e15689d1945e0a8cfe1ac3aac048dff9556678f @markstory markstory committed Oct 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Routing/Router.php
@@ -633,7 +633,7 @@ public static function getRequest($current = false) {
* @return array Parameter information
*/
public static function getParams($current = false) {
- if ($current) {
+ if ($current && self::$_requests) {
return self::$_requests[count(self::$_requests) - 1]->params;
}
if (isset(self::$_requests[0])) {

0 comments on commit 2e15689

Please sign in to comment.