]> git.mxchange.org Git - friendica-addons.git/commitdiff
Avoid empty post
authorMichael <heluecht@pirati.ca>
Thu, 2 Aug 2018 05:09:37 +0000 (05:09 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 2 Aug 2018 05:09:37 +0000 (05:09 +0000)
twitter/twitter.php

index 8ac6197bf2f49d1f1ad43efe0ff24798d8a7d669..a130a1cd59adf63eb09ea01e703989b05f3d6809 100644 (file)
@@ -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;
                }