Skip to content

Commit

Permalink
Fixed #58
Browse files Browse the repository at this point in the history
  • Loading branch information
PerryRylance committed May 30, 2022
1 parent c3e351c commit 89e74ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DOMDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ public function saveInnerBody()
if(!$body)
$body = $this->getDocumentElementSafe();

if(!$body)
if(count($body) == 0)
return null;

for($node = $body->firstChild; $node != null; $node = $node->nextSibling)
for($node = $body[0]->firstChild; $node != null; $node = $node->nextSibling)
$result .= $this->saveHTML($node);

return $result;
Expand Down

0 comments on commit 89e74ee

Please sign in to comment.