]> git.mxchange.org Git - friendica.git/commitdiff
Fix count() warning in mod/friendica
authorHypolite Petovan <mrpetovan@gmail.com>
Mon, 23 Apr 2018 04:00:29 +0000 (00:00 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 23 Apr 2018 04:00:29 +0000 (00:00 -0400)
- Add default value for Config call

mod/friendica.php

index 6c143634caf980ae9cc430e46dfc8c53f0b380ca..1929150f27beb626ae4baad195798e807b578eb4 100644 (file)
@@ -116,14 +116,14 @@ function friendica_content(App $a)
        } else {
                $o .= '<p>' . L10n::t('No installed addons/apps') . '</p>' . PHP_EOL;
        }
-       
+
        if (Config::get('system', 'tosdisplay'))
        {
                $o .= '<p>'.L10n::t('Read about the <a href="%1$s/tos">Terms of Service</a> of this node.', System::baseurl()).'</p>';
        }
 
-       $blocklist = Config::get('system', 'blocklist');
-       if (count($blocklist)) {
+       $blocklist = Config::get('system', 'blocklist', []);
+       if (!empty($blocklist)) {
                $o .= '<div id="about_blocklist"><p>' . L10n::t('On this server the following remote servers are blocked.') . '</p>' . PHP_EOL;
                $o .= '<table class="table"><thead><tr><th>' . L10n::t('Blocked domain') . '</th><th>' . L10n::t('Reason for the block') . '</th></thead><tbody>' . PHP_EOL;
                foreach ($blocklist as $b) {