-
-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Version: 3.1
Bug Description
Variables are passed invalid to block
Steps To Reproduce
The issue you can reproduce on: https://fiddle.nette.org/nette/#87a55c3e23
Expected Behavior
$name = hack instead error, or $value = hack (as hack is 2nd passed variable to block)
Possible Solution
Instead of rendering block with parameters in array => maybe could be used variadic arguments?
Ie, instead:
$this->renderBlock('BLOCK', [$name, 0 => 'hack'] + [], 'html') /* line 1 */;
use:
$this->renderBlock('BLOCK', $this->parameters($name, 01, 02), 'html') /* line 1 */;
public function parameters(...$allParams){
return $allParams;
}
Metadata
Metadata
Assignees
Labels
No labels