]> git.mxchange.org Git - friendica.git/commitdiff
restructure the conditions if gnetwork and gaddr is empty
authorrabuzarus <>
Thu, 1 Jun 2017 10:47:47 +0000 (12:47 +0200)
committerrabuzarus <>
Thu, 1 Jun 2017 10:47:47 +0000 (12:47 +0200)
include/NotificationsManager.php

index 96af0b76c20a9476aac3f43fd929759b404cd438..ad0ede6dbe4a970728ea4da98c581f948fa0f8ee 100644 (file)
@@ -850,13 +850,13 @@ class NotificationsManager {
                // get the missing data data from other sources
                if ($arr['gnetwork'] == "" || $arr['gaddr'] == "") {
                        $ret = get_contact_details_by_url($arr['url']);
-               }
 
-               if ($arr['gnetwork'] == "") {
-                       $arr['gnetwork'] = $ret['network'];
-               }
-               if ($arr['gaddr'] == "") {
-                       $arr['gaddr'] = $ret['addr'];
+                       if ($arr['gnetwork'] == "" && $ret['network'] != "") {
+                               $arr['gnetwork'] = $ret['network'];
+                       }
+                       if ($arr['gaddr'] == "" && $ret['addr'] != "") {
+                               $arr['gaddr'] = $ret['addr'];
+                       }
                }
 
                return $arr;