From ada9e2a0f2ab06ed1891777e06c1d68239802f0c Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 29 Jan 2020 23:19:03 -0500 Subject: [PATCH] Suppress Countable type warning messages in mod/dfrn_request - Address https://github.com/friendica/friendica/issues/8192 --- mod/dfrn_request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index e29109160..d8ad2bd3a 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -62,8 +62,8 @@ function dfrn_request_init(App $a) */ function dfrn_request_post(App $a) { - if (($a->argc != 2) || (!count($a->profile))) { - Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . 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 ?? [])); 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. * */ - if (!(is_array($a->profile) && count($a->profile))) { + if (empty($a->profile['uid'])) { notice(DI::l10n()->t('Profile unavailable.') . EOL); return; }