• Resolved John

    (@dsl225)


    Getting this:

    Warning: count(): Parameter must be an array or an object that implements Countable in /.../plugins/email-posts-to-subscribers/configuration/configuration-edit.php on line 101

Viewing 6 replies - 1 through 6 (of 6 total)
  • That there would be a bug.

    Line 100 does this:

    $elp_set_posttype = isset($_POST[‘elp_set_posttype’]) ? $_POST[‘elp_set_posttype’] : ”;

    It’s followed by 101:
    $total_type = count($elp_set_posttype);

    So if no post type is set, it tries to do a count(”), that is on an empty string.

    The easy fix is to change line 100 to:

    $elp_set_posttype = isset($_POST[‘elp_set_posttype’]) ? $_POST[‘elp_set_posttype’] : [];

    That way count is happening on an empty array rather than an empty string.

    The question now is whether the author will fix it. I’ll head over to gopiplus.com and send him a contact message.

    Thread Starter John

    (@dsl225)

    Thanks!

    I noticed in the meanwhile that this warning is no more triggered when you disable both templates under Mail Configuration as I did because I use only Post Notification.

    Plugin Author gopiplus

    (@gopiplus)

    @dsl225 @bretmiller Thanks for the info. PHP warning issue has been fixed on plugin version 5.6.1

    Thread Starter John

    (@dsl225)

    Great, many thanks!

    @gopiplus Thank you!

    Thread Starter John

    (@dsl225)

    I updated to latest version 5.6.1 since a couple of days already but I’m now getting this:

    Sep 29, 06:36:24

    Warning: count(): Parameter must be an array or an object that implements Countable in /…/wp-content/plugins/email-posts-to-subscribers/query/dbquery-notification.php on line 285

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP warning’ is closed to new replies.