From dbd56144cddaebacc30633b2b88c107c5c07d04c Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 26 Sep 2023 15:29:26 +0900 Subject: [PATCH] fix: outer options are not merged with inner options --- system/Router/RouteCollection.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index ca080152ff28..325111e519a4 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -771,7 +771,10 @@ public function group(string $name, ...$params) $callback = array_pop($params); if ($params && is_array($params[0])) { - $this->currentOptions = array_shift($params); + $this->currentOptions = array_merge( + $this->currentOptions ?? [], + array_shift($params) + ); } if (is_callable($callback)) {