Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit ffc1523

Browse files
committed
Do not cache results of previous render
This one-liner resets the `$__content` value prior to the render loop to ensure a cached result is not returned in the off chance that `$template` is a falsy value.
1 parent d48c1d9 commit ffc1523

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Renderer/PhpRenderer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ public function render($nameOrModel, $values = null)
491491
extract($__vars);
492492
unset($__vars); // remove $__vars from local scope
493493

494+
$this->__content = '';
494495
while ($this->__template = array_pop($this->__templates)) {
495496
$this->__file = $this->resolver($this->__template);
496497
if (! $this->__file) {

0 commit comments

Comments
 (0)