From 4350dce21e50e75df36dcb85ed123db607c5e597 Mon Sep 17 00:00:00 2001 From: Brian Sweeney Date: Sat, 4 Feb 2023 16:26:53 -0500 Subject: [PATCH] Parse opacity only from color value array fixes #100 --- src/Svg/Style.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Svg/Style.php b/src/Svg/Style.php index 9fac469..98fda9e 100644 --- a/src/Svg/Style.php +++ b/src/Svg/Style.php @@ -169,7 +169,7 @@ protected function fillStyles($styles) $value = $this->color; } } - if ($value !== null && $value[3] !== 1 && array_key_exists("{$from}-opacity", $style_map) === true) { + if (is_array($value) && $value[3] !== 1 && array_key_exists("{$from}-opacity", $style_map) === true) { $styles["{$from}-opacity"] = $value[3]; } break;