We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd34a95 commit e52c512Copy full SHA for e52c512
1 file changed
src/Security/Identity.php
@@ -35,9 +35,7 @@ public function __construct(string|int $id, string|array|null $roles = null, ?it
35
{
36
$this->setId($id);
37
$this->setRoles((array) $roles);
38
- $this->data = $data instanceof \Traversable
39
- ? iterator_to_array($data)
40
- : (array) $data;
+ $this->data = iterator_to_array($data ?? []);
41
}
42
43
0 commit comments