moduleRoute - Ensure scalar parameters are wrapped in an array.#2781
moduleRoute - Ensure scalar parameters are wrapped in an array.#2781zachgarwood wants to merge 3 commits intoarea17:3.xfrom
moduleRoute - Ensure scalar parameters are wrapped in an array.#2781Conversation
|
I do have a comment on this, aren't parameters an associative array, meaning they need a key? In which case would passing a string or int to parameters which would result in an indexed array be valid? |
If the parameters don't have a string key, they are applied to the URL template after the named params, by position, see Laravel's So, given a route defined as: Getting back to
|
Description
In the
moduleRoutehelper function,$parametersis allowed to be passed in as anintor astring, in addition to anarray; however, the variable is then passed toarray_mergewithout any type conversion, and throws an error.Related Issues
Fixes #2780