]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Prevent jabber.php error by checking key exists
authorCiaranG <ciaran@ciarang.com>
Sat, 23 Aug 2008 05:35:48 +0000 (01:35 -0400)
committerCiaranG <ciaran@ciarang.com>
Sat, 23 Aug 2008 05:35:48 +0000 (01:35 -0400)
darcs-hash:20080823053548-f6e2c-dfc8a0acd9fb8589ed37e54c7d0d3d38afff34f5.gz

lib/jabber.php

index 415bb45d73b82af373ac10bcc2034a4c56d22c1f..cba7f62c4cb38400b0d88a54a688eea67a94275a 100644 (file)
@@ -247,7 +247,7 @@ function jabber_broadcast_notice($notice) {
        if ($sub->find()) {
                while ($sub->fetch()) {
                        $user = User::staticGet($sub->subscriber);
-                       if ($user && $user->jabber && $user->jabbernotify && !$sent_to[$user->id]) {
+                       if ($user && $user->jabber && $user->jabbernotify && !array_key_exists($user->id,$sent_to)) {
                                common_log(LOG_INFO,
                                                   'Sending notice ' . $notice->id . ' to ' . $user->jabber,
                                                   __FILE__);