From 048f1211dcbcb1d47b80576b5fe40581cdfd22d7 Mon Sep 17 00:00:00 2001 From: Rix <45132928+rixafy@users.noreply.github.com> Date: Tue, 16 Dec 2025 06:49:15 +0100 Subject: [PATCH] Fix typo --- src/Application/UI/Component.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Application/UI/Component.php b/src/Application/UI/Component.php index 5db344c5f..49eee4e3e 100644 --- a/src/Application/UI/Component.php +++ b/src/Application/UI/Component.php @@ -89,7 +89,8 @@ public function addComponent( protected function createComponent(string $name): ?Nette\ComponentModel\IComponent { if (method_exists($this, $method = 'createComponent' . $name)) { - (new AccessPolicy(new \ReflectionMethod($this, $method)))->checkAccess($this); + $rm = new \ReflectionMethod($this, $method); + (new AccessPolicy($rm))->checkAccess($this); $this->checkRequirements($rm); } return parent::createComponent($name);