]> git.mxchange.org Git - friendica.git/commitdiff
Use "http_build_query"
authorMichael <heluecht@pirati.ca>
Mon, 28 Oct 2019 19:34:09 +0000 (19:34 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 28 Oct 2019 19:34:09 +0000 (19:34 +0000)
src/Module/Login.php

index 895da7bdbf7fff2055563e450bb1f8b41fe40066..3999980ec96fe9e22e19f2cdfcd0955f43262156 100644 (file)
@@ -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);
        }
 }