From 8806688d686ad44f0072b73846baafa5f9de1d02 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 1 Jun 2017 12:47:47 +0200 Subject: [PATCH] restructure the conditions if gnetwork and gaddr is empty --- include/NotificationsManager.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php index 96af0b76c..ad0ede6db 100644 --- a/include/NotificationsManager.php +++ b/include/NotificationsManager.php @@ -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;