Merge branch 'master' of https://git.mcnd.ca/mcndave/picea
This commit is contained in:
commit
3bcd5c9780
|
@ -24,10 +24,12 @@ abstract class Context {
|
||||||
|
|
||||||
public array $switchStack = [];
|
public array $switchStack = [];
|
||||||
|
|
||||||
public array $iterateStack = [];
|
public array $iterationStack = [];
|
||||||
|
|
||||||
public array $useStack = [];
|
public array $useStack = [];
|
||||||
|
|
||||||
|
public array $sections = [];
|
||||||
|
|
||||||
public int $functions = 0;
|
public int $functions = 0;
|
||||||
|
|
||||||
public array $functionStack = [];
|
public array $functionStack = [];
|
||||||
|
|
|
@ -249,12 +249,13 @@ PATTERN;
|
||||||
if ($default ?? false) {
|
if ($default ?? false) {
|
||||||
$value = $default;
|
$value = $default;
|
||||||
}
|
}
|
||||||
elseif ($this->enforceExistingArguments) {
|
elseif ($this->enforceExistingArguments && ! strpos($route, sprintf('[/{%s:', $variable)) ) {
|
||||||
throw new \RuntimeException(sprintf("Error while preparing route %s : could not match variable '%s' into given arguments ( %s )", $route, $variable, json_encode($arguments)));
|
throw new \RuntimeException(sprintf("Error while preparing route %s : could not match variable '%s' into given arguments ( %s )", $route, $variable, json_encode($arguments)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$search[ $item[0] ] = $value;
|
$search[$item[0]] = $value ?? "";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$route = str_replace(array_keys($search), array_values($search), $route);
|
$route = str_replace(array_keys($search), array_values($search), $route);
|
||||||
|
|
Loading…
Reference in New Issue