Support » Plugin: W3 Total Cache » Small PHP 7.2 Compatibility Bug

  • Got error ‘PHP message: PHP Warning: count(): Parameter must be an array or an object that implements Countable in /<purged>/wp-content/plugins/w3-total-cache/Cdn_Plugin.php on line 1203\n’,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Technically that is not a bug but only a PHP deprecation warning. It still functions as it did since 7.1 (and earlier) just that PHP is warning that in future releases it could be a problem.

    If you are comfy with coding i can give you a fix to make it hush up.

    Thread Starter techsurgeons


    That would be great, thanks.


    Could you please share the fix? (Coding is not an issue)

    Replacing a line in “function get_replaced_urls()” seems to work:

    Replace the line
    if ( count( $this->_replaced_urls ) ) {
    if ( $this->_replaced_urls && count($this->_replaced_urls) ) {
    and test.

    at least my errors seems to have been gone.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Small PHP 7.2 Compatibility Bug’ is closed to new replies.