Title: Error with PHP 7.2+
Last modified: December 18, 2018

---

# Error with PHP 7.2+

 *  [thisnameisalreadyinuse](https://wordpress.org/support/users/jeffwalker99/)
 * (@jeffwalker99)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/error-with-php-7-2-5/)
 * Seeing the following error with PHP 7.2+ …
 * > Warning: count(): Parameter must be an array or an object that implements Countable
   > in /xxx/xxx/xxx/xxx/wp-content/plugins/sticky-side-buttons/ssb-main.php on 
   > line 217
 * Something like this should fix it…
 * `if ( is_array($buttons) || is_object($buttons) ) $btns_count = count($buttons['
   btns']);`

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

 *  [ashdowntech](https://wordpress.org/support/users/ashdowntech/)
 * (@ashdowntech)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/error-with-php-7-2-5/#post-11292129)
 * Just bumping this as I’m seeing it after site upgrade to PHP 7.2. Have temp patched
   the plugin on my site to prevent the warnings, but a check like the one above
   in the next release would be great. Thanks!
 *  [johnnyn7](https://wordpress.org/support/users/johnnyn7/)
 * (@johnnyn7)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-with-php-7-2-5/#post-11508053)
 * how did you fix the error
 *  [ashdowntech](https://wordpress.org/support/users/ashdowntech/)
 * (@ashdowntech)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/error-with-php-7-2-5/#post-11509532)
 * In ssb-main.php, replace single line 217 with the following code:
 *     ```
       if (is_array($buttons['btns']))
       	$btns_count = count($buttons['btns']);
       else
       	$btns_count = 0;
       ```
   

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

The topic ‘Error with PHP 7.2+’ is closed to new replies.

 * ![](https://ps.w.org/sticky-side-buttons/assets/icon-256x256.jpg?rev=1575383)
 * [Sticky Side Buttons](https://wordpress.org/plugins/sticky-side-buttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sticky-side-buttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sticky-side-buttons/)
 * [Active Topics](https://wordpress.org/support/plugin/sticky-side-buttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sticky-side-buttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sticky-side-buttons/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [ashdowntech](https://wordpress.org/support/users/ashdowntech/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/error-with-php-7-2-5/#post-11509532)
 * Status: not resolved