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.
@dsl225 @bretmiller Thanks for the info. PHP warning issue has been fixed on plugin version 5.6.1
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