Title: PHP 7.2 Warning in addons.api.php
Last modified: December 15, 2017

---

# PHP 7.2 Warning in addons.api.php

 *  Resolved [xiphi](https://wordpress.org/support/users/xiphi/)
 * (@xiphi)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/php-7-2-warning-in-addons-api-php/)
 * I got this warning after upgrading to PHP 7.2:
 * > PHP Warning: count(): Parameter must be an array or an object that implements
   > Countable in /wp-content/plugins/iwp-client/addons.api.php
 * Plugin Version: 1.6.8.1
 * See also:
    [https://wiki.php.net/rfc/counting_non_countables](https://wiki.php.net/rfc/counting_non_countables)
 * Fix (backwards compatible):
 *     ```
       diff -ur iwp-client-23/addons.api.php iwp-client-24/addons.api.php
       --- iwp-client-23/addons.api.php	2017-12-15 10:54:51.532245753 +0100
       +++ iwp-client-24/addons.api.php	2017-12-15 11:08:06.676780082 +0100
       @@ -37,7 +37,7 @@
        	function iwp_mmb_function_exists($callback)
        	{
        		global $iwp_core;
       -		if (count($callback) === 2) {
       +		if (is_array($callback) && count($callback) === 2) {
        			if (!method_exists($callback[0], $callback[1]))
        				wp_die($iwp_core->iwp_dashboard_widget('Information', '', '<p>Class ' . get_class($callback[0]) . ' does not contain <b>"' . $callback[1] . '"</b> function</p>', '', '50%'));
        		} else {
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [infinitewp](https://wordpress.org/support/users/infinitewp/)
 * (@infinitewp)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-7-2-warning-in-addons-api-php/#post-10047206)
 * Hi there,
 * We already fixed these warnings in our recent update releases. Kindly update 
   IWP client plugin to the latest version on all your WordPress sites and let us
   know if you still experience the same problem.

Viewing 1 replies (of 1 total)

The topic ‘PHP 7.2 Warning in addons.api.php’ is closed to new replies.

 * ![](https://ps.w.org/iwp-client/assets/icon-256x256.png?rev=1132008)
 * [InfiniteWP Client](https://wordpress.org/plugins/iwp-client/)
 * [Support Threads](https://wordpress.org/support/plugin/iwp-client/)
 * [Active Topics](https://wordpress.org/support/plugin/iwp-client/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/iwp-client/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/iwp-client/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [infinitewp](https://wordpress.org/support/users/infinitewp/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/php-7-2-warning-in-addons-api-php/#post-10047206)
 * Status: resolved