From 105452ef796c13fa3faddb92d6d27db6c25cb7d6 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 10 Jul 2018 05:25:54 +0000 Subject: [PATCH] The next round --- pumpio/pumpio.php | 4 ++++ twitter/twitter.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index a8e5c31f..9e02a74d 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1307,6 +1307,10 @@ function pumpio_fetchinbox(&$a, $uid) $success = false; } + if (!$success) { + return; + } + if ($user->items) { $posts = array_reverse($user->items); diff --git a/twitter/twitter.php b/twitter/twitter.php index c106db88..d9baf1bd 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1135,7 +1135,7 @@ function twitter_expand_entities(App $a, $body, $item, $picture) $oembed_data = OEmbed::fetchURL($expanded_url); - if (empty($oembed_data)) { + if (empty($oembed_data) || empty($oembed_data->type)) { continue; } @@ -1516,7 +1516,7 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, foreach ($posts as $post) { $postarray = twitter_createpost($a, $uid, $post, $self, false, false, false); - if (emptx($postarray['body'])) { + if (empty($postarray['body'])) { continue; }