From ef1b2fca4c96abcd155694d72cca107f8235a102 Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 2 Dec 2024 17:27:26 +0000 Subject: [PATCH] handle xml parser returning false or null --- generator/src/Method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = '';