Title: PHP 7 errors
Last modified: January 20, 2018

---

# PHP 7 errors

 *  Resolved [audioscavenger](https://wordpress.org/support/users/audioscavenger/)
 * (@audioscavenger)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-7/)
 * This bug occurs with latest plugin version + Apache 2.4 + PHP 7.2
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in /path/wp-content/plugins/wordpress-ping-optimizer/cbnet-ping-optimizer.php
   on line 477

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

 *  Thread Starter [audioscavenger](https://wordpress.org/support/users/audioscavenger/)
 * (@audioscavenger)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-7/#post-9885598)
 * sorry i forgot to add the first error:
 * Deprecated: Methods with the same name as their class will not be constructors
   in a future version of PHP; cbnetPingOptimizer has a deprecated constructor in/
   path/wp-content/plugins/wordpress-ping-optimizer/cbnet-ping-optimizer.php on 
   line 36
 * just rename function cbnetPingOptimizer() to cbnetPingOptimizerFunc()
 * no need to thank me
 *  Plugin Author [Pankaj Jha](https://wordpress.org/support/users/masdiblogs/)
 * (@masdiblogs)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-7/#post-9885976)
 * Too Good.. I fixed bot the issue.
    Issue 1: if (is_null($this->cbnetpo_future_pings))
   $pingCount=0; else $pingCount=count($this->cbnetpo_future_pings);
 * Issue 2: I used below in place of construct method
    __construct
 *  Thread Starter [audioscavenger](https://wordpress.org/support/users/audioscavenger/)
 * (@audioscavenger)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-7/#post-9886783)
 * thanks for the quick react! and thank you for this useful plugin.

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

The topic ‘PHP 7 errors’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-ping-optimizer_ebeef0.svg)
 * [WordPress Ping Optimizer](https://wordpress.org/plugins/wordpress-ping-optimizer/)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-ping-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-ping-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-ping-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-ping-optimizer/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 3 replies
 * 2 participants
 * Last reply from: [audioscavenger](https://wordpress.org/support/users/audioscavenger/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/php-7-errors-7/#post-9886783)
 * Status: resolved