diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index 8fba39dc03be..231711c48aac 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -1604,7 +1604,7 @@ private function processArrayCallableSyntax(string $from, array $to): string private function getMethodParams(string $from): string { preg_match_all('/\(.+?\)/', $from, $matches); - $count = is_countable($matches[0]) ? count($matches[0]) : 0; + $count = count($matches[0]); $params = '';