You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it an expected behavior: in a controller that receives a request from the other controller using a forward() call, calling $request->getQueryString() returns the original query-string? (Request $request is injected as an argument in the controller action definition).
As a workaround I had to replace $request->getQueryString() with http_build_query($request->query->all()).
The text was updated successfully, but these errors were encountered:
I think this it is a normal behavior: when you forward a request you actually duplicate the master request which is based on the php globals and do a sub request which is not, so you will have the same $_SERVER variable.
An easy solution is to call the method overrideGlobals() on the sub request which overrides the php globals according to the request parameters (and updates the query string in the server bag).
Is it an expected behavior: in a controller that receives a request from the other controller using a
forward()
call, calling$request->getQueryString()
returns the original query-string? (Request $request
is injected as an argument in the controller action definition).As a workaround I had to replace
$request->getQueryString()
withhttp_build_query($request->query->all())
.The text was updated successfully, but these errors were encountered: