Merge pull request #775 from annando/twitter-notice

Avoid a notice in twitter.php
This commit is contained in:
Hypolite Petovan 2018-11-10 20:49:05 -05:00 committed by GitHub
commit 2d745b11d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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