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