TwitterBridge: don't array_merge() non-arrays
authorChimo <chimo@chromic.org>
Mon, 9 Feb 2015 01:11:50 +0000 (20:11 -0500)
committerChimo <chimo@chromic.org>
Mon, 9 Feb 2015 01:11:50 +0000 (20:11 -0500)
Fixes: ErrorException: [2] array_merge(): Argument #2 is not an array
plugins/TwitterBridge/daemons/synctwitterfriends.php

index 8b8ffbfd496bdbaaa0382f71c4bf12db2469a4a7..a3862eedfde45e9fcd67da1aa4101cb71b8fd87a 100755 (executable)
@@ -183,7 +183,9 @@ class SyncTwitterFriendsDaemon extends ParallelizingDaemon
                            "of Twitter user $flink->foreign_id friends.");
                 continue;
             } else {
-                $friends = array_merge($friends, $more_friends);
+                if (is_array($more_friends)) {
+                    $friends = array_merge($friends, $more_friends);
+                }
             }
         }