From b7eda7a944e7d4e6e99d059a222a445e45258c81 Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Wed, 8 Apr 2026 15:03:49 +0500 Subject: [PATCH] controller arguments fixed --- mirzaev/minimal/system/core.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mirzaev/minimal/system/core.php b/mirzaev/minimal/system/core.php index ee50dfe..c113108 100755 --- a/mirzaev/minimal/system/core.php +++ b/mirzaev/minimal/system/core.php @@ -256,7 +256,13 @@ final class core $request->options = $route->options; // Processing the method of the controller and exit (success) - $action = fn(): string => (string) $route->controller->{$route->method}(...($route->parameters + $route->variables + $request->parameters)); + $action = function() use ($route, $request): string { + try { + return (string) $route->controller->{$route->method}(...($route->parameters + $route->variables + $request->parameters)); + } catch (exception $exception) { + return (string) $route->controller->{$route->method}($route->parameters + $route->variables + $request->parameters) + } + }; foreach ($route->middlewares as $middleware) { // Iterating over the route middlewares