Skip to content

Commit e32785e

Browse files
View Renderer - Unset section after rendering it.
1 parent 9eb0c75 commit e32785e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/View/View.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,10 @@ public function renderSection(string $sectionName)
480480
return;
481481
}
482482

483-
foreach ($this->sections[$sectionName] as $contents)
483+
foreach ($this->sections[$sectionName] as $key => $contents)
484484
{
485485
echo $contents;
486+
unset($this->sections[$sectionName][$key]);
486487
}
487488
}
488489

0 commit comments

Comments
 (0)