From 00e9e85a2409d5f28856253b1bc15a228f0a200c Mon Sep 17 00:00:00 2001 From: ADmad Date: Fri, 11 Oct 2024 14:00:56 +0530 Subject: [PATCH] Exception hook methods should be protected. This prevents them to be executable through routing. --- en/development/errors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/development/errors.rst b/en/development/errors.rst index 3121aa1a38..0b4e9ec572 100644 --- a/en/development/errors.rst +++ b/en/development/errors.rst @@ -225,7 +225,7 @@ a ``missingWidget()`` controller method, and CakePHP would use class ErrorController extends AppController { - public function missingWidget(MissingWidgetException $error) + protected function missingWidget(MissingWidgetException $error) { // You can prepare additional template context or trap errors. }