Skip to content

Commit

Permalink
[6.x] Fix routing bug that causes missing parameters to be ignored (#…
Browse files Browse the repository at this point in the history
…30659)

* Fix routing bug that causes missing parameters to be ignored

* Fix style
  • Loading branch information
GuidoHendriks authored and taylorotwell committed Nov 22, 2019
1 parent 85ce90e commit 1a2b337
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RouteUrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ protected function replaceRouteParameters($path, array &$parameters)
// Reset only the numeric keys...
$parameters = array_merge($parameters);

return (empty($parameters) && ! Str::endsWith($match[0], '?}'))
return (! isset($parameters[0]) && ! Str::endsWith($match[0], '?}'))
? $match[0]
: Arr::pull($parameters, 0);
}, $path);
Expand Down

0 comments on commit 1a2b337

Please sign in to comment.