Skip to content

Commit 4b33917

Browse files
committed
minor #49047 [Config] Fix EnumNode invalid value message (fancyweb)
This PR was merged into the 6.3 branch. Discussion ---------- [Config] Fix EnumNode invalid value message | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | - | Tickets | - | License | MIT | Doc PR | - Forgot one `array_unique` in #48957 Commits ------- fd48818 [Config] Fix EnumNode invalid value message
2 parents 4513a3a + fd48818 commit 4b33917

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Config/Definition/EnumNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function finalizeValue(mixed $value): mixed
4848
$value = parent::finalizeValue($value);
4949

5050
if (!\in_array($value, $this->values, true)) {
51-
$ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values))));
51+
$ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_unique(array_map('json_encode', $this->values)))));
5252
$ex->setPath($this->getPath());
5353

5454
throw $ex;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy