Sometimes $parent->parentNode is null and fails.

This commit is contained in:
Josua2012 2013-04-06 22:52:02 +02:00 committed by Ingo Schommer
parent 429ac17a0f
commit e3b6feba2a

View File

@ -421,10 +421,10 @@ class ShortcodeParser {
protected function moveMarkerToCompliantHome($node, $parent, $location) {
// Move before block parent
if($location == self::BEFORE) {
if (isset($parent->parentNode))
$parent->parentNode->insertBefore($node, $parent);
}
// Move after block parent
else if($location == self::AFTER) {
} else if($location == self::AFTER) {
// Move after block parent
$this->insertAfter($node, $parent);
}
// Split parent at node