Added validation when $parent is null
This commit is contained in:
@@ -605,7 +605,7 @@ class TemplatePower extends TemplatePowerParser
|
||||
public function newBlock($blockname)
|
||||
{
|
||||
$parent = &$this->content[$this->parent[$blockname] . '_' . $this->index[$this->parent[$blockname]]];
|
||||
$lastitem = sizeof($parent);
|
||||
$lastitem = !is_null($parent) ? sizeof($parent) : 0;
|
||||
$lastitem > 1 ? $lastitem-- : $lastitem = 0;
|
||||
$ind_blockname = $blockname . '_' . $this->index[$blockname];
|
||||
if (!isset($parent[$lastitem]["_B:$blockname"])) {
|
||||
|
||||
Reference in New Issue
Block a user