]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix some notices in omb.php
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 20 Feb 2009 22:02:34 +0000 (17:02 -0500)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 20 Feb 2009 22:02:34 +0000 (17:02 -0500)
lib/omb.php

index f2dbef5ba945f97ed10c172cd5e3a5367c844035..29e14c75f76adff6255e62010b3e5e46b999b0d8 100644 (file)
@@ -239,7 +239,7 @@ function omb_broadcast_profile($profile)
         while ($sub->fetch()) {
             $rp = Remote_profile::staticGet('id', $sub->subscriber);
             if ($rp) {
-                if (!$updated[$rp->updateprofileurl]) {
+                if (!array_key_exists($rp->updateprofileurl, $updated)) {
                     if (omb_update_profile($profile, $rp, $sub)) {
                         $updated[$rp->updateprofileurl] = true;
                     }
@@ -295,7 +295,9 @@ function omb_update_profile($profile, $remote_profile, $subscription)
 
     common_debug('Got HTTP result "'.print_r($result,true).'"', __FILE__);
 
-    if ($result->status == 403) { # not authorized, don't send again
+    if (empty($result) || $result) {
+        common_debug("Unable to contact " . $req->get_normalized_http_url());
+    } else if ($result->status == 403) { # not authorized, don't send again
         common_debug('403 result, deleting subscription', __FILE__);
         $subscription->delete();
         return false;