diff --git a/lib/FieldType/XmlText/SearchField.php b/lib/FieldType/XmlText/SearchField.php index 4b17189e..babc3b79 100644 --- a/lib/FieldType/XmlText/SearchField.php +++ b/lib/FieldType/XmlText/SearchField.php @@ -60,7 +60,7 @@ private function extractText(DOMNode $node) { $text = ''; - if ($node->childNodes) { + if ($node->childNodes !== null && $node->childNodes->length > 0) { foreach ($node->childNodes as $child) { $text .= $this->extractText($child); }