Skip to main content

php7.2 Suppress warnings in cms admin

Comments

4 comments

  • mcgee
    Yes check is_array function or is_object function in a if statement before the count will fix this issue or user error_reporting(0); So $a = 0; if(is_array($array) || is_object($array)) { $a = count($array); } this code will fix that.
    0
  • fullfatdesigns
    Hi Mcgee Thanks for the suggestion. I was hoping there was a way to switch off the warnings as the count example warning was just one of the warnings and there are several sites, so I guess I was hoping for an easy option ;) If there isn't though, I'll look at trying this though, thanks. Wayne
    0
  • Infopro
    Check to see if there's something useful for you in this thread:
    0
  • fullfatdesigns
    Thanks Infopro I've had a quick skim and it seems like there are a few ways of achieving what I'm after. I'll have a proper read and go over the weekend.
    0

Please sign in to leave a comment.