clean up some files to make enchanced inbox run for first time

This commit is contained in:
Fernando Ontiveros
2025-04-05 10:45:25 +00:00
parent ba61a274d4
commit 14efc705b3
6 changed files with 60 additions and 15 deletions

View File

@@ -605,7 +605,11 @@ class TemplatePower extends TemplatePowerParser
public function newBlock($blockname)
{
$parent = &$this->content[$this->parent[$blockname] . '_' . $this->index[$this->parent[$blockname]]];
$lastitem = sizeof($parent);
if (is_array($parent) || $parent instanceof Countable) {
$lastitem = sizeof($parent);
} else {
$lastitem = 0; // or handle it in another way as needed
}
$lastitem > 1 ? $lastitem-- : $lastitem = 0;
$ind_blockname = $blockname . '_' . $this->index[$blockname];
if (!isset($parent[$lastitem]["_B:$blockname"])) {