Merge pull request #8204 from MrPetovan/bug/warnings

Suppress Countable type warning messages in mod/dfrn_request
This commit is contained in:
Philipp 2020-01-30 06:36:26 +01:00 committed by GitHub
commit a32da98aef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -62,8 +62,8 @@ function dfrn_request_init(App $a)
*/ */
function dfrn_request_post(App $a) function dfrn_request_post(App $a)
{ {
if (($a->argc != 2) || (!count($a->profile))) { if ($a->argc != 2 || empty($a->profile)) {
Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile)); Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ', profile()=' . count($a->profile ?? []));
return; return;
} }
@ -226,7 +226,7 @@ function dfrn_request_post(App $a)
* in $a->argv[1] and we should have their complete info in $a->profile. * in $a->argv[1] and we should have their complete info in $a->profile.
* *
*/ */
if (!(is_array($a->profile) && count($a->profile))) { if (empty($a->profile['uid'])) {
notice(DI::l10n()->t('Profile unavailable.') . EOL); notice(DI::l10n()->t('Profile unavailable.') . EOL);
return; return;
} }