From dd7070938b339c45e6ad3e210a292d0286e5867b Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 28 Oct 2019 19:34:09 +0000 Subject: [PATCH] Use "http_build_query" --- src/Module/Login.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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); } } -- 2.39.5