Skip to content

Commit

Permalink
proper array access fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Apr 29, 2017
1 parent 88de274 commit 2df3383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Spiral/Validation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ private function extractData($data): array
return $data->getFields();
}

if ($data instanceof \ArrayAccess) {
if ($data instanceof \ArrayAccess && $data instanceof \Traversable) {
$result = [];
foreach ($data as $key => $value) {
$result[$key] = $value;
Expand Down

0 comments on commit 2df3383

Please sign in to comment.