From 8f562a4b22e9ac038d323832cc3dac8aa5ab190a Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 2 Aug 2018 05:09:37 +0000 Subject: [PATCH] Avoid empty post --- twitter/twitter.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/twitter/twitter.php b/twitter/twitter.php index 8ac6197b..a130a1cd 100644 --- a/twitter/twitter.php +++ b/twitter/twitter.php @@ -1514,6 +1514,11 @@ function twitter_fetchparentposts(App $a, $uid, $post, TwitterOAuth $connection, break; } + if (empty($post->id_str)) { + logger("twitter_fetchparentposts: This is not a post " . json_encode($post), LOGGER_DEBUG); + break; + } + if (DBA::exists('item', ['uri' => 'twitter::' . $post->id_str, 'uid' => $uid])) { break; } -- 2.39.5