- Fixed error thrown on optional routes which arguments were not all fullfield

This commit is contained in:
Dave M. 2023-06-09 15:31:53 -04:00
parent be65d45b41
commit 386e0aa448
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ PATTERN;
if ($default ?? false) {
$value = $default;
}
elseif ($this->enforceExistingArguments) {dump($routeParam);
elseif ( strpos($route, "[{$matches[0][0]}]") !== false && $this->enforceExistingArguments) {
throw new \RuntimeException(sprintf("Error while preparing route %s : could not match variable '%s' into given arguments ( %s ) from %s::%s", $route, $variable, json_encode($arguments), $routeParam['class'], $routeParam['classMethod']));
}
}