]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
weird error with SubMirror
authorEvan Prodromou <evan@status.net>
Fri, 27 Jan 2012 20:27:46 +0000 (15:27 -0500)
committerEvan Prodromou <evan@status.net>
Fri, 27 Jan 2012 20:27:46 +0000 (15:27 -0500)
plugins/SubMirror/SubMirrorPlugin.php

index 95fccabe9dc859256969fe3a5d4077fbeee41b1f..427153ab22ff7c2b35f5d5fb865cf807ddd30350 100644 (file)
@@ -157,6 +157,10 @@ class SubMirrorPlugin extends Plugin
      */
     function onOstatus_profileSubscriberCount($oprofile, &$count)
     {
+        if (empty($oprofile) || !($oprofile instanceof Ostatus_profile)) {
+            return true;
+        }
+
         if ($oprofile->profile_id) {
             $mirror = new SubMirror();
             $mirror->subscribed = $oprofile->profile_id;
@@ -166,6 +170,7 @@ class SubMirrorPlugin extends Plugin
                 }
             }
         }
+
         return true;
     }