diff --git a/system/classes/Kohana/Response.php b/system/classes/Kohana/Response.php index cda4081..a74f506 100644 --- a/system/classes/Kohana/Response.php +++ b/system/classes/Kohana/Response.php @@ -274,9 +274,8 @@ public function cookie($key = null, $value = null) // Handle the set cookie calls if (is_array($key)) { - reset($key); - while (list($_key, $_value) = each($key)) { - $this->cookie($_key, $_value); + foreach ($key as $k => $v) { + $this->cookie($k, $v); } } else { if (!is_array($value)) {