Skip to content

Commit

Permalink
View Renderer - Reset sections after generating the ouput
Browse files Browse the repository at this point in the history
Sections array is left populated after gnerating output. This creates issues when the same shared View rendered instace is called for the second time.
  • Loading branch information
najdanovicivan committed Jan 20, 2020
1 parent 01fd252 commit 8c7d874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ public function render(string $view, array $options = null, bool $saveData = nul
$output = $this->render($layoutView, $options, $saveData);
}

// Reset sections
$this->sections = [];

$this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']);

if ($this->debug && (! isset($options['debug']) || $options['debug'] === true))
Expand Down

0 comments on commit 8c7d874

Please sign in to comment.