Skip to content

Commit 457a840

Browse files
fredroobsweeney
authored andcommitted
Update OutlineSimple.php
Fix warning: count(): parameter must be an array or an object that implements countable
1 parent b01a8d7 commit 457a840

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FontLib/Glyph/OutlineSimple.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public function getSVGContours($points = null) {
265265
$points = $this->points;
266266
}
267267

268-
$length = count($points);
268+
$length = (empty($points) ? 0 : count($points));
269269
$firstIndex = 0;
270270
$count = 0;
271271

@@ -332,4 +332,4 @@ protected function getSVGPath($points, $startIndex, $count) {
332332
function midValue($a, $b) {
333333
return $a + ($b - $a) / 2;
334334
}
335-
}
335+
}

0 commit comments

Comments
 (0)