- variable of block can't be overwritten
This commit is contained in:
parent
0c0ba39072
commit
c975de0557
@ -229,8 +229,7 @@ class BlockToken implements ControlStructure {
|
|||||||
$this->rendering = true;
|
$this->rendering = true;
|
||||||
|
|
||||||
if ($this->using['this'] ?? false) {
|
if ($this->using['this'] ?? false) {
|
||||||
$thisProxy = $this->using['this'];
|
throw new \InvalidArgumentException("Block '{$this->viewPath}' cannot overwrite 'this' variable.");
|
||||||
unset($this->using['this']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $classTemplate->picea->inlineBlock($thisProxy ?? $this, $this->viewPath, ...$this->arguments);
|
return $classTemplate->picea->inlineBlock($thisProxy ?? $this, $this->viewPath, ...$this->arguments);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user