From 83880f2d91d29be92fbd66bd4d0052c318be93f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Brecher?= <34324008+mildabre@users.noreply.github.com> Date: Wed, 29 May 2024 01:56:16 +0200 Subject: [PATCH] Correction of false exception message in startup check The exception message states the lowest possible presenter class where method beforeRender is found, so the error can be here or in its parents not descendants !! --- src/Application/UI/Presenter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 82bf72c92..000128b6d 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -189,7 +189,7 @@ public function run(Application\Request $request): Application\Response $this->startup(); if (!$this->startupCheck) { $class = static::getReflection()->getMethod('startup')->getDeclaringClass()->getName(); - throw new Nette\InvalidStateException("Method $class::startup() or its descendant doesn't call parent::startup()."); + throw new Nette\InvalidStateException("Method $class::startup() or its parents doesn't call parent::startup()."); } // calls $this->action()