1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-18 19:51:22 +02:00

Fix bug in Hsv\StringColorDecoder::class

This commit is contained in:
Oliver Vogel
2025-08-03 16:43:01 +02:00
parent c6bb518ede
commit 05ffd8d16b

View File

@@ -22,7 +22,7 @@ class StringColorDecoder extends AbstractDecoder implements DecoderInterface
throw new DecoderException('Unable to decode input'); throw new DecoderException('Unable to decode input');
} }
$pattern = '/^hs(v|b)\((?P<h>[0-9\.]+), ?(?P<s>[0-9\.]+%?), ?(?P<v>[0-9\.]+%?)?\)$/i'; $pattern = '/^hs(v|b)\((?P<h>[0-9\.]+), ?(?P<s>[0-9\.]+%?), ?(?P<v>[0-9\.]+%?)\)$/i';
if (preg_match($pattern, $input, $matches) != 1) { if (preg_match($pattern, $input, $matches) != 1) {
throw new DecoderException('Unable to decode input'); throw new DecoderException('Unable to decode input');
} }