• Joe

    (@joewa1980)


    We’re receiving these PHP warnings in our error.log:

    [23-Jan-2018 06:11:10 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/server/public_html/mywebsite.com/wp-content/plugins/cloudflare/src/WordPress/Hooks.php on line 133

    Vaguely similar to this: https://ww.wp.xz.cn/support/topic/constant-bad-requests/

    The function is shown below:

      public function purgeCacheByRevelantURLs($postId)
        {
            if ($this->isPluginSpecificCacheEnabled()) {
                $wpDomainList = $this->integrationAPI->getDomainList();
                $wpDomain = $wpDomainList[0];
                if (count($wpDomain) <= 0) {
                    return;
                }

    The error does not trigger when ‘Automatic Cache Management‘ is set to ‘Off‘.

The topic ‘PHP Warning: count():’ is closed to new replies.