We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c10cc1 commit 15239b4Copy full SHA for 15239b4
1 file changed
system/Cookie/CookieStore.php
@@ -13,7 +13,6 @@
13
14
namespace CodeIgniter\Cookie;
15
16
-use ArrayIterator;
17
use CodeIgniter\Cookie\Exceptions\CookieException;
18
use Countable;
19
use IteratorAggregate;
@@ -192,7 +191,9 @@ public function count(): int
192
191
*/
193
public function getIterator(): Traversable
194
{
195
- return new ArrayIterator($this->cookies);
+ foreach ($this->cookies as $key => $value) {
+ yield $key => $value;
196
+ }
197
}
198
199
/**
0 commit comments