Title: PHP warning
Last modified: August 27, 2020

---

# PHP warning

 *  Resolved [John](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-warning-252/)
 * 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)

 *  [bret.miller](https://wordpress.org/support/users/bretmiller/)
 * (@bretmiller)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13322402)
 * 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](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13322416)
 * 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](https://wordpress.org/support/users/gopiplus/)
 * (@gopiplus)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13428854)
 * [@dsl225](https://wordpress.org/support/users/dsl225/) [@bretmiller](https://wordpress.org/support/users/bretmiller/)
   Thanks for the info. PHP warning issue has been fixed on plugin version 5.6.1
 *  Thread Starter [John](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13428857)
 * Great, many thanks!
 *  [bret.miller](https://wordpress.org/support/users/bretmiller/)
 * (@bretmiller)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13432877)
 * [@gopiplus](https://wordpress.org/support/users/gopiplus/) Thank you!
 *  Thread Starter [John](https://wordpress.org/support/users/dsl225/)
 * (@dsl225)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13466266)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/email-posts-to-subscribers_f5f9fd.
   svg)
 * [Email posts to subscribers](https://wordpress.org/plugins/email-posts-to-subscribers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-posts-to-subscribers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-posts-to-subscribers/)
 * [Active Topics](https://wordpress.org/support/plugin/email-posts-to-subscribers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-posts-to-subscribers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-posts-to-subscribers/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [John](https://wordpress.org/support/users/dsl225/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/php-warning-252/#post-13466266)
 * Status: resolved