• Resolved Bonaldi

    (@bonaldi)


    Hi,
    Your plugin creates an error warning because it doesn’t seem to be fully compatible with PHP 7.2 and count() function:
    Warning: count(): Parameter must be an array or an object that implements Countable in /wordpress/wp-includes/post-template.php on line 284

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Bonaldi

    (@bonaldi)

    Resolved

    Plugin Author Chad Butler

    (@cbutlerjr)

    count() is a PHP 4, 5, & 7 function, so this wouldn’t be a PHP 7.2 issue (the argument must be an array or countable object in all versions). However, I don’t get this notice for any PHP 7 versions.

    Based on the location of the issue, WP-Members does not directly use this function (get_the_content), nor does it use the function the_content() that uses it. It does use filters on the_content, but the filter hook comes after get_the_content() is called. So I don’t think the issue would be generated by WP-Members – at least not directly.

    Glad you resolved it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP 7.2 compatibility’ is closed to new replies.