From: Michael Date: Mon, 28 Oct 2019 19:34:09 +0000 (+0000) Subject: Use "http_build_query" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=dd7070938b339c45e6ad3e210a292d0286e5867b;p=friendica.git Use "http_build_query" --- diff --git a/src/Module/Login.php b/src/Module/Login.php index 895da7bdbf..3999980ec9 100644 --- a/src/Module/Login.php +++ b/src/Module/Login.php @@ -414,20 +414,22 @@ class Login extends BaseModule } } + $arg = []; + if (!empty($nick)) { - $args .= '&nickname=' . urlencode($nick); + $arg['nickname'] = $nick; } elseif (!empty($first)) { - $args .= '&nickname=' . urlencode($first); + $arg['nickname'] = $first; } if (!empty($photosq)) { - $args .= '&photo=' . urlencode($photosq); + $arg['photo'] = $photosq; } elseif (!empty($photo)) { - $args .= '&photo=' . urlencode($photo); + $arg['photo'] = $photo; } - $args .= '&openid_url=' . urlencode(Strings::escapeTags(trim(Session::get('openid_identity')))); + $arg['openid_url'] = Strings::escapeTags(trim(Session::get('openid_identity'))); - return 'register?' . $args; + return 'register?' . http_build_query($arg); } }