Skip to content

Commit 88d6037

Browse files
authored
[10.x] Route::getController() should return null when the accessing (#49269)
closure based route fixes #49267 Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 7be968a commit 88d6037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Illuminate/Routing/Route.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ protected function runController()
268268
*/
269269
public function getController()
270270
{
271+
if (! $this->isControllerAction()) {
272+
return null;
273+
}
274+
271275
if (! $this->controller) {
272276
$class = $this->getControllerClass();
273277

0 commit comments

Comments
 (0)