Skip to content

Commit b24f701

Browse files
committed
Merge branch 'master' into pr/26
2 parents 588b371 + faade67 commit b24f701

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/Svg/Document.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?php
1+
<?php
22
/**
33
* @package php-svg-lib
44
* @link http://github.com/PhenX/php-svg-lib
5-
* @author Fabien Ménager <[email protected]>
5+
* @author Fabien Ménager <[email protected]>
66
* @license GNU LGPLv3+ http://www.gnu.org/copyleft/lesser.html
77
*/
88

@@ -333,6 +333,9 @@ private function _tagStart($parser, $name, $attributes)
333333
case 'text':
334334
$tag = new Text($this, $name);
335335
break;
336+
337+
case 'desc':
338+
return;
336339
}
337340

338341
if ($tag) {
@@ -400,4 +403,4 @@ function _tagEnd($parser, $name)
400403
$tag->handleEnd();
401404
}
402405
}
403-
}
406+
}

src/Svg/Tag/AbstractTag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ abstract class AbstractTag
2121
/** @var Style */
2222
protected $style;
2323

24-
protected $attributes;
24+
protected $attributes = array();
2525

2626
protected $hasShape = true;
2727

@@ -180,4 +180,4 @@ protected function applyTransform($attributes)
180180
}
181181
}
182182
}
183-
}
183+
}

src/Svg/Tag/LinearGradient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
namespace Svg\Tag;
1010

1111

12-
use Svg\Gradient\Stop;
12+
use Svg\Gradient;
1313
use Svg\Style;
1414

1515
class LinearGradient extends AbstractTag
@@ -19,7 +19,7 @@ class LinearGradient extends AbstractTag
1919
protected $x2;
2020
protected $y2;
2121

22-
/** @var Stop[] */
22+
/** @var Gradient\Stop[] */
2323
protected $stops = array();
2424

2525
public function start($attributes)
@@ -47,7 +47,7 @@ public function getStops() {
4747
continue;
4848
}
4949

50-
$_stop = new Stop();
50+
$_stop = new Gradient\Stop();
5151
$_attributes = $_child->attributes;
5252

5353
// Style

0 commit comments

Comments
 (0)