Skip to content

Commit

Permalink
Updated Dom\Element::getInnerHtml(), return early on null childNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bacinsky committed Apr 27, 2017
1 parent d13995d commit 46a1a89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/WebinoDraw/Dom/Element.php
Expand Up @@ -72,6 +72,10 @@ public function setAttributes(array $attribs, $callback = null)
*/
public function getInnerHtml()
{
if (null === $this->childNodes) {
return '';
}

$innerHtml = '';
foreach ($this->childNodes as $child) {
$childHtml = $child->ownerDocument->saveXML($child);
Expand Down

0 comments on commit 46a1a89

Please sign in to comment.