Use "http_build_query"

This commit is contained in:
Michael 2019-10-28 19:34:09 +00:00
parent e1f36bfd7a
commit dd7070938b
1 changed files with 8 additions and 6 deletions

View File

@ -414,20 +414,22 @@ class Login extends BaseModule
} }
} }
$arg = [];
if (!empty($nick)) { if (!empty($nick)) {
$args .= '&nickname=' . urlencode($nick); $arg['nickname'] = $nick;
} elseif (!empty($first)) { } elseif (!empty($first)) {
$args .= '&nickname=' . urlencode($first); $arg['nickname'] = $first;
} }
if (!empty($photosq)) { if (!empty($photosq)) {
$args .= '&photo=' . urlencode($photosq); $arg['photo'] = $photosq;
} elseif (!empty($photo)) { } 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);
} }
} }