diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 3834d970c..2d010723e 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -1017,7 +1017,8 @@ class Controller extends Object { $type = 'all'; if (isset($defaults[0])) { - $type = array_shift($defaults); + $type = $defaults[0]; + unset($defaults[0]); } $extra = array_diff_key($defaults, compact( 'conditions', 'fields', 'order', 'limit', 'page', 'recursive' @@ -1141,4 +1142,4 @@ class Controller extends Object { return false; } } -?> \ No newline at end of file +?>