Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2336db

Browse files
committed
bug #52194 [Validator] Handle null case (OskarStark)
This PR was merged into the 6.3 branch. Discussion ---------- [Validator] Handle `null` case | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | -- | License | MIT Commits ------- 3c6c130 [Validator] Handle `null` case
2 parents fbd3a63 + 3c6c130 commit e2336db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Validator/Constraints/Cascade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Cascade extends Constraint
2828
public function __construct(array|string|null $exclude = null, array $options = null)
2929
{
3030
if (\is_array($exclude) && !array_is_list($exclude)) {
31-
$options = array_merge($exclude, $options);
31+
$options = array_merge($exclude, $options ?? []);
3232
} else {
3333
$this->exclude = array_flip((array) $exclude);
3434
}

0 commit comments

Comments
 (0)