Apply suggestions from code review

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2023-01-22 21:39:12 +01:00 committed by GitHub
parent 17df97fccd
commit 85275d4473
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1288,7 +1288,7 @@ function twitter_fetchtimeline(int $uid): void
$osecret = DI::pConfig()->get($uid, 'twitter', 'oauthsecret'); $osecret = DI::pConfig()->get($uid, 'twitter', 'oauthsecret');
$lastid = DI::pConfig()->get($uid, 'twitter', 'lastid'); $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 == '') { if ($application_name == '') {
$application_name = DI::baseUrl()->getHostname(); $application_name = DI::baseUrl()->getHostname();
@ -2187,7 +2187,7 @@ function twitter_fetchhometimeline(int $uid): void
Logger::info('Fetching timeline', ['uid' => $uid]); 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 == '') { if ($application_name == '') {
$application_name = DI::baseUrl()->getHostname(); $application_name = DI::baseUrl()->getHostname();