Skip to content

Commit

Permalink
handle xml parser returning false or null
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Dec 2, 2024
1 parent 79b7912 commit ef1b2fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/src/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down

0 comments on commit ef1b2fc

Please sign in to comment.