diff --git a/src/Nodes/Shapes/SVGPolygonalShape.php b/src/Nodes/Shapes/SVGPolygonalShape.php index d5b6217..01edcd4 100644 --- a/src/Nodes/Shapes/SVGPolygonalShape.php +++ b/src/Nodes/Shapes/SVGPolygonalShape.php @@ -28,7 +28,7 @@ public static function constructFromAttributes($attrs) $points = array(); if (isset($attrs['points'])) { - $coords = preg_split('/[\s,]+/', $attrs['points']); + $coords = preg_split('/[\s,]+/', trim($attrs['points'])); for ($i = 0, $n = count($coords); $i < $n; $i += 2) { $points[] = array( floatval($coords[$i]),