diff --git a/generator/src/Method.php b/generator/src/Method.php index 3e610500..592a08e4 100644 --- a/generator/src/Method.php +++ b/generator/src/Method.php @@ -177,7 +177,7 @@ private function removeString(string $string, string $search): string private function getStringForXPath(string $xpath): string { $paragraphs = $this->rootEntity->xpath($xpath); - if ($paragraphs === false) { + if ($paragraphs === false || $paragraphs === null) { throw new \RuntimeException('Error while performing Xpath request.'); } $str = '';