From 694e2f3cc55962e988ab77cb29f3b0177f4a2d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20B=C3=A1thory?= Date: Sat, 27 Jun 2020 22:04:05 +0200 Subject: [PATCH] fix creating corrupt bbox if a component is empty --- src/Geometry/Collection.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Geometry/Collection.php b/src/Geometry/Collection.php index a178fcdd..b56c73ef 100644 --- a/src/Geometry/Collection.php +++ b/src/Geometry/Collection.php @@ -141,6 +141,9 @@ public function getBBox() $maxX = $maxY = $minX = $minY = 0; foreach ($this->components as $i => $component) { $componentBoundingBox = $component->getBBox(); + if ($componentBoundingBox === null) { + continue; + } // On the first run through, set the bounding box to the component's bounding box if ($i == 0) {