Fixed deprecation notice: numeric prefix cannot be null in http_build_query.

This commit is contained in:
Kamil Wylegala 2022-01-04 23:08:45 +01:00
parent a908a13f96
commit 7302598222
2 changed files with 2 additions and 2 deletions

View file

@ -750,7 +750,7 @@ class CakeRequest implements ArrayAccess {
public function here($base = true) { public function here($base = true) {
$url = $this->here; $url = $this->here;
if (!empty($this->query)) { if (!empty($this->query)) {
$url .= '?' . http_build_query($this->query, null, '&'); $url .= '?' . http_build_query($this->query, "", '&');
} }
if (!$base) { if (!$base) {
$url = preg_replace('/^' . preg_quote($this->base, '/') . '/', '', $url, 1); $url = preg_replace('/^' . preg_quote($this->base, '/') . '/', '', $url, 1);

View file

@ -1073,7 +1073,7 @@ class Router {
$out = $q; $out = $q;
$q = $extra; $q = $extra;
} }
$addition = http_build_query($q, null, $join); $addition = http_build_query($q, "", $join);
if ($out && $addition && substr($out, strlen($join) * -1, strlen($join)) !== $join) { if ($out && $addition && substr($out, strlen($join) * -1, strlen($join)) !== $join) {
$out .= $join; $out .= $join;