From 32849d91c890b5cc4f469edaaa3e271e76f1fc19 Mon Sep 17 00:00:00 2001 From: fredroo Date: Sat, 21 Apr 2018 17:43:18 -0400 Subject: [PATCH] Update OutlineSimple.php Fix warning: count(): parameter must be an array or an object that implements countable --- src/FontLib/Glyph/OutlineSimple.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FontLib/Glyph/OutlineSimple.php b/src/FontLib/Glyph/OutlineSimple.php index 3c023de..56b2fb4 100644 --- a/src/FontLib/Glyph/OutlineSimple.php +++ b/src/FontLib/Glyph/OutlineSimple.php @@ -265,7 +265,7 @@ public function getSVGContours($points = null) { $points = $this->points; } - $length = count($points); + $length = (empty($points) ? 0 : count($points)); $firstIndex = 0; $count = 0; @@ -332,4 +332,4 @@ protected function getSVGPath($points, $startIndex, $count) { function midValue($a, $b) { return $a + ($b - $a) / 2; } -} \ No newline at end of file +}