Clean calls to http_build_query()
This commit is contained in:
parent
781c64cd37
commit
4055224373
@ -209,7 +209,7 @@ class Form extends Link implements \ArrayAccess
|
|||||||
parse_str($query, $currentParameters);
|
parse_str($query, $currentParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
$queryString = http_build_query(array_merge($currentParameters, $this->getValues()), null, '&');
|
$queryString = http_build_query(array_merge($currentParameters, $this->getValues()), '', '&');
|
||||||
|
|
||||||
$pos = strpos($uri, '?');
|
$pos = strpos($uri, '?');
|
||||||
$base = false === $pos ? $uri : substr($uri, 0, $pos);
|
$base = false === $pos ? $uri : substr($uri, 0, $pos);
|
||||||
|
@ -522,7 +522,7 @@ class Request
|
|||||||
*/
|
*/
|
||||||
public function overrideGlobals()
|
public function overrideGlobals()
|
||||||
{
|
{
|
||||||
$this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), null, '&')));
|
$this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), '', '&')));
|
||||||
|
|
||||||
$_GET = $this->query->all();
|
$_GET = $this->query->all();
|
||||||
$_POST = $this->request->all();
|
$_POST = $this->request->all();
|
||||||
|
@ -2065,7 +2065,7 @@ class RequestContentProxy extends Request
|
|||||||
{
|
{
|
||||||
public function getContent($asResource = false)
|
public function getContent($asResource = false)
|
||||||
{
|
{
|
||||||
return http_build_query(array('_method' => 'PUT', 'content' => 'mycontent'));
|
return http_build_query(array('_method' => 'PUT', 'content' => 'mycontent'), '', '&');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ class SwitchUserListener implements ListenerInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$request->query->remove($this->usernameParameter);
|
$request->query->remove($this->usernameParameter);
|
||||||
$request->server->set('QUERY_STRING', http_build_query($request->query->all()));
|
$request->server->set('QUERY_STRING', http_build_query($request->query->all(), '', '&'));
|
||||||
|
|
||||||
$response = new RedirectResponse($request->getUri(), 302);
|
$response = new RedirectResponse($request->getUri(), 302);
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class LogoutUrlGenerator
|
|||||||
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;
|
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;
|
||||||
|
|
||||||
if (!empty($parameters)) {
|
if (!empty($parameters)) {
|
||||||
$url .= '?'.http_build_query($parameters);
|
$url .= '?'.http_build_query($parameters, '', '&');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$this->router) {
|
if (!$this->router) {
|
||||||
|
Reference in New Issue
Block a user