clem
2 months ago
174
3
Laravel

Route::redirect helper bug [SOLVED]

Posted 2 months ago by clem

Hey guys,

Since I upgraded to Laravel 6, the Route::redirect helper is throwing the error:

Argument 2 passed to Symfony\Component\HttpFoundation\RedirectResponse::__construct() must be of the type integer, null given

I did some digging and I found what appears to be a bug in the Laravel codebase.

I posted the issue #30639 where you'll find the "Steps To Reproduce" and the "Source of the bug" but I'm very surprised to get a "copy-paste answer".

I'm using the $route->forgetParameter() feature to avoid having to deal with the wildcard subdomain parameter in all my controllers. This feature may be undocumented but it contains a bug and I believe it should be fixed.

What do you guys think?

Thanks!

Please sign in or create an account to participate in this conversation.