projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
8809a1c
)
fixed toXml() method when some nodes are null
author
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 9 Jun 2010 14:03:58 +0000 (16:03 +0200)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 9 Jun 2010 14:03:58 +0000 (16:03 +0200)
lib/Twig/Node.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Node.php
b/lib/Twig/Node.php
index
9fc162d
..
488918d
100644
(file)
--- a/
lib/Twig/Node.php
+++ b/
lib/Twig/Node.php
@@
-79,6
+79,10
@@
class Twig_Node implements Twig_NodeInterface, ArrayAccess, Countable, Iterator
}
foreach ($this->nodes as $name => $n) {
+ if (null === $n) {
+ continue;
+ }
+
$child = $n->toXml(true)->getElementsByTagName('node')->item(0);
$child = $dom->importNode($child, true);
$child->setAttribute('name', $name);