]> git.mxchange.org Git - friendica.git/blobdiff - mod/redir.php
Ensure *toArray returns an array
[friendica.git] / mod / redir.php
index 0e93a63fc293ba8ab6e3c8ad02f9384ea4ca7537..c99e1823c76c84f05de01e5a7a3adbe622909e34 100644 (file)
@@ -72,8 +72,8 @@ function redir_init(App $a) {
                        {
                                foreach ($_SESSION['remote'] as $v) {
                                        if (!empty($v['uid']) && !empty($v['cid']) &&
-                                           $v['uid'] === Session::get('visitor_visiting') &&
-                                           $v['cid'] === Session::get('visitor_id')) {
+                                           $v['uid'] == Session::get('visitor_visiting') &&
+                                           $v['cid'] == Session::get('visitor_id')) {
                                                // Remote user is already authenticated.
                                                $target_url = defaults($url, $contact_url);
                                                Logger::log($contact['name'] . " is already authenticated. Redirecting to " . $target_url, Logger::DEBUG);
@@ -85,7 +85,7 @@ function redir_init(App $a) {
 
                // When the remote page does support OWA, then we enforce the use of it
                $basepath = Contact::getBasepath($contact_url);
-               if ($basepath == System::baseUrl()) {
+               if (Strings::compareLink($basepath, System::baseUrl())) {
                        $use_magic = true;
                } else {
                        $serverret = Network::curl($basepath . '/magic');