From: Hypolite Petovan Date: Mon, 23 Apr 2018 04:00:29 +0000 (-0400) Subject: Fix count() warning in mod/friendica X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=da4892b4d2c295925dab2c6263c8bb37dfa5a845;p=friendica.git Fix count() warning in mod/friendica - Add default value for Config call --- 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') . '