• 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

    (@ashdowntech)

    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!

    how did you fix the error

    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.