Skip to content

Commit

Permalink
Prevent possible recursion when wrong array dimension is specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed May 11, 2024
1 parent 656304a commit 20a7c9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Column/ArrayColumnSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private function dbTypecastArray(mixed $value, int $dimension): array|null
return [];
}

if ($dimension === 1) {
if ($dimension <= 1) {
return array_map(
[$this->getColumn(), 'dbTypecast'],
$value instanceof Traversable
Expand Down

0 comments on commit 20a7c9f

Please sign in to comment.