From 88d6037dcda4f5696b85ce24ad11ff7e97fd14f0 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 8 Dec 2023 03:28:35 +0800 Subject: [PATCH] [10.x] `Route::getController()` should return `null` when the accessing (#49269) closure based route fixes #49267 Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Routing/Route.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Illuminate/Routing/Route.php b/src/Illuminate/Routing/Route.php index 886d85165f04..7664500784f8 100755 --- a/src/Illuminate/Routing/Route.php +++ b/src/Illuminate/Routing/Route.php @@ -268,6 +268,10 @@ protected function runController() */ public function getController() { + if (! $this->isControllerAction()) { + return null; + } + if (! $this->controller) { $class = $this->getControllerClass();