Skip to content

Commit

Permalink
Merge commit '1426fa74efa0c91f0c814fc93aaca1a4c82735d7'
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Mar 10, 2024
2 parents 8322c39 + 1426fa7 commit f56ba0c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Core/Router/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,14 @@ public function compile(): Route
$new->setOptions($options);

if ($options['extra']['default_controller'] ?? null) {
$new->controller($options['extra']['default_controller']);
foreach ($new->options['handlers'] as $k => &$handler) {
if (is_string($handler)) {
$handler = [
$options['extra']['default_controller'],
$handler
];
}
}
}

if ($options['extra']['default_view'] ?? null) {
Expand Down

0 comments on commit f56ba0c

Please sign in to comment.