- Small fix on URL generation

This commit is contained in:
Dave M. 2020-05-04 22:48:38 -04:00
parent bf3816c3db
commit 2f31684092
1 changed files with 3 additions and 6 deletions

View File

@ -169,19 +169,17 @@ class UrlExtension implements Extension {
$variable = $item[1];
}
if ( array_key_exists($variable, $arguments) ) {
$value = $arguments[ $item[1] ];
}
else if ( isset($default) ) {
$value = $default;
$value = ""; # $default;
}
else {
$variable = $item[1];
}
if ( array_key_exists($variable, $arguments) ) {
/*if ( array_key_exists($variable, $arguments) ) {
$value = $arguments[ $item[1] ];
}
else if ( isset($default) ) {
@ -189,9 +187,8 @@ class UrlExtension implements Extension {
}
else {
throw new \InvalidArgumentException("Argument `$variable` is missing within required route parameter(s)");
}
}*/
$search[ $item[0] ] = $value;
unset($arguments[ $item[1] ]);
}