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

Fix bug in Hsl\StringColorDecoder::class

This commit is contained in:
Oliver Vogel
2025-08-03 10:52:00 +02:00
parent 8c49eb21a6
commit c6bb518ede

View File

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