Skip to content

Commit bba6e15

Browse files
sormesfabpot
authored andcommitted
[Validator] Error using CssColor with doctrine annotations
1 parent 1e76053 commit bba6e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct($formats = [], string $message = null, array $groups
7272
if (!$formats) {
7373
$options['value'] = self::$validationModes;
7474
} elseif (\is_array($formats) && \is_string(key($formats))) {
75-
$options = array_merge($formats, $options);
75+
$options = array_merge($formats, $options ?? []);
7676
} elseif (\is_array($formats)) {
7777
if ([] === array_intersect(self::$validationModes, $formats)) {
7878
throw new InvalidArgumentException(sprintf('The "formats" parameter value is not valid. It must contain one or more of the following values: "%s".', $validationModesAsString));

0 commit comments

Comments
 (0)