mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Sometimes $parent->parentNode is null and fails.
This commit is contained in:
parent
429ac17a0f
commit
e3b6feba2a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user