From da4892b4d2c295925dab2c6263c8bb37dfa5a845 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 23 Apr 2018 00:00:29 -0400 Subject: [PATCH] Fix count() warning in mod/friendica - Add default value for Config call --- mod/friendica.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/friendica.php b/mod/friendica.php index 6c143634ca..1929150f27 100644 --- a/mod/friendica.php +++ b/mod/friendica.php @@ -116,14 +116,14 @@ function friendica_content(App $a) } else { $o .= '

' . L10n::t('No installed addons/apps') . '

' . PHP_EOL; } - + if (Config::get('system', 'tosdisplay')) { $o .= '

'.L10n::t('Read about the Terms of Service of this node.', System::baseurl()).'

'; } - $blocklist = Config::get('system', 'blocklist'); - if (count($blocklist)) { + $blocklist = Config::get('system', 'blocklist', []); + if (!empty($blocklist)) { $o .= '

' . L10n::t('On this server the following remote servers are blocked.') . '

' . PHP_EOL; $o .= '' . PHP_EOL; foreach ($blocklist as $b) {
' . L10n::t('Blocked domain') . '' . L10n::t('Reason for the block') . '