Fix bugs reported by scrutinizer

This commit is contained in:
Stéphane Goetz
2016-07-29 22:38:03 +02:00
parent fb5fb41e96
commit 948f2aaa39
12 changed files with 66 additions and 48 deletions

View File

@ -164,8 +164,11 @@ class Processor implements DocumentProcessorInterface
$a = new Link('#' . $entry->getId());
foreach ($this->cloneChildren($entry->getContent()) as $node) {
$a->appendChild($node);
$children = $entry->getChildren();
if ($children != null) {
foreach ($this->cloneChildren($entry->getContent()) as $node) {
$a->appendChild($node);
}
}
$p = new Paragraph();