Skip to content

Commit

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

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

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

return $result;
Expand Down

0 comments on commit 1e7069a

Please sign in to comment.