- Small fix on URL generation
This commit is contained in:
parent
bf3816c3db
commit
2f31684092
|
@ -169,19 +169,17 @@ class UrlExtension implements Extension {
|
||||||
$variable = $item[1];
|
$variable = $item[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( array_key_exists($variable, $arguments) ) {
|
if ( array_key_exists($variable, $arguments) ) {
|
||||||
$value = $arguments[ $item[1] ];
|
$value = $arguments[ $item[1] ];
|
||||||
}
|
}
|
||||||
else if ( isset($default) ) {
|
else if ( isset($default) ) {
|
||||||
$value = $default;
|
$value = ""; # $default;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$variable = $item[1];
|
$variable = $item[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*if ( array_key_exists($variable, $arguments) ) {
|
||||||
if ( array_key_exists($variable, $arguments) ) {
|
|
||||||
$value = $arguments[ $item[1] ];
|
$value = $arguments[ $item[1] ];
|
||||||
}
|
}
|
||||||
else if ( isset($default) ) {
|
else if ( isset($default) ) {
|
||||||
|
@ -189,8 +187,7 @@ class UrlExtension implements Extension {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new \InvalidArgumentException("Argument `$variable` is missing within required route parameter(s)");
|
throw new \InvalidArgumentException("Argument `$variable` is missing within required route parameter(s)");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
$search[ $item[0] ] = $value;
|
$search[ $item[0] ] = $value;
|
||||||
unset($arguments[ $item[1] ]);
|
unset($arguments[ $item[1] ]);
|
||||||
|
|
Loading…
Reference in New Issue