diff --git a/src/Application/Request.php b/src/Application/Request.php index 5c9985ce3..37142cf60 100644 --- a/src/Application/Request.php +++ b/src/Application/Request.php @@ -158,7 +158,7 @@ public function getMethod(): ?string */ public function isMethod(string $method): bool { - return strcasecmp((string) $this->method, $method) === 0; + return strcasecmp($this->method, $method) === 0; } diff --git a/src/Application/UI/Presenter.php b/src/Application/UI/Presenter.php index 33a9a8b64..fbf927a35 100644 --- a/src/Application/UI/Presenter.php +++ b/src/Application/UI/Presenter.php @@ -194,7 +194,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() diff --git a/tests/UI/ComponentReflection.getActionRenderMethod().phpt b/tests/UI/ComponentReflection.getActionRenderMethod().phpt index d1a9d3a75..7b734e8c8 100644 --- a/tests/UI/ComponentReflection.getActionRenderMethod().phpt +++ b/tests/UI/ComponentReflection.getActionRenderMethod().phpt @@ -13,31 +13,26 @@ class TestPresenter extends Presenter { public function actionDefault(): void { - } public function renderDefault(): void { - } public function actionAltAction(): void { - } public function renderAltRender(): void { - } public function handleSignal(): void { - } }