Skip to content

Commit 140bd80

Browse files
author
naitsirch
committed
Fixed problem in condition for rotation transformation that could lead to an access of an undefined array index (#44)
1 parent 4d2cca7 commit 140bd80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Svg/Tag/AbstractTag.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ protected function applyTransform($attributes)
166166
break;
167167

168168
case "rotate":
169-
if (isset($t[2]) || isset($t[3])) {
169+
if (isset($t[2])) {
170+
$t[3] = isset($t[3]) ? $t[3] : 0;
170171
$surface->translate($t[2], $t[3]);
171172
$surface->rotate($t[1]);
172173
$surface->translate(-$t[2], -$t[3]);

0 commit comments

Comments
 (0)