]> git.mxchange.org Git - friendica-addons.git/commitdiff
Apply suggestions from code review
authorMichael Vogel <icarus@dabo.de>
Sun, 22 Jan 2023 20:39:12 +0000 (21:39 +0100)
committerGitHub <noreply@github.com>
Sun, 22 Jan 2023 20:39:12 +0000 (21:39 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
twitter/twitter.php

index f35ff8d3e6d036284f55f560cc89796b2fd3803c..5aeecf30ddc2b7f7f36fa1ae5b35b8ac96302dce 100644 (file)
@@ -1288,7 +1288,7 @@ function twitter_fetchtimeline(int $uid): void
        $osecret = DI::pConfig()->get($uid, 'twitter', 'oauthsecret');
        $lastid  = DI::pConfig()->get($uid, 'twitter', 'lastid');
 
-       $application_name = DI::keyValue()->get('twitter_application_name');
+       $application_name = DI::keyValue()->get('twitter_application_name') ?? '';
 
        if ($application_name == '') {
                $application_name = DI::baseUrl()->getHostname();
@@ -2187,7 +2187,7 @@ function twitter_fetchhometimeline(int $uid): void
 
        Logger::info('Fetching timeline', ['uid' => $uid]);
 
-       $application_name = DI::keyValue()->get('twitter_application_name');
+       $application_name = DI::keyValue()->get('twitter_application_name') ?? '';
 
        if ($application_name == '') {
                $application_name = DI::baseUrl()->getHostname();