]> git.mxchange.org Git - friendica-addons.git/commitdiff
Avoid a notice in twitter.php
authorMichael <heluecht@pirati.ca>
Sat, 27 Oct 2018 12:40:59 +0000 (12:40 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 27 Oct 2018 12:40:59 +0000 (12:40 +0000)
twitter/twitter.php

index d3440d53bf72f6caec8ece171303375183f350af..f60625e62ef958a6bd780c4e2fdd48a4f913227d 100644 (file)
@@ -1801,6 +1801,9 @@ function twitter_fetch_own_contact(App $a, $uid)
                // Fetching user data
                // get() may throw TwitterOAuthException, but we will catch it later
                $user = $connection->get('account/verify_credentials');
+               if (empty($user) || empty($user->id_str)) {
+                       return false;
+               }
 
                PConfig::set($uid, 'twitter', 'own_id', $user->id_str);