Merge pull request #892 from dereuromark/router-fix

avoid offset -1 error on tests etc
This commit is contained in:
Mark Story 2012-10-09 05:01:06 -07:00
commit 2e15689d19

View file

@ -633,7 +633,7 @@ class Router {
* @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])) {