Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Handle undefined array key error #42606

Merged
merged 2 commits into from
Jun 1, 2022
Merged

Conversation

ksassnowski
Copy link
Contributor

Fixes #42605

Oh boy, the gift that keeps on giving. Looks like there's yet another edge case.

Summary

This PR fixes a regression when trying passing a model to the route helper for a route without route parameters.

$model = new User(['id' => 1]);

Route::get('/foo')->name('foo');

route('foo', $model); // Used to return `/foo?1`, now throws an exception

While I think this behavior is pretty weird, I guess it shouldn't break between minor versions.

@driesvints
Copy link
Member

At least we're adding tests for all of this 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v9.15 has breaking change in route() helper: Unidentified array key 0
3 participants