• bskno

    (@frankmartialarts)


    Some people might have a small issue by seeing a warning which appears on pages which says about an error on functions.php line 244.
    The problem was the version of PHP I used, which was 7.2, so I changed it to 7.1 and on cPanel and the warning was gone!
    To change php just open the cPanel, go down to Software section and click on “Select PHP version, then choose 7.1 version from the drop-down menu, then confirm it as current php version.

Viewing 10 replies - 1 through 10 (of 10 total)
  • can you also post exactly the error message? I make sure the theme is compatible since PHP version 5.2 and this is a weird bug.

    Thread Starter bskno

    (@frankmartialarts)

    I just changed the PHP again to copy the exact message. ??

    Here it goes:

    Warning
    : count(): Parameter must be an array or an object that implements Countable in
    /home/ealthqmf/public_html/wp-content/themes/evolve/functions.php
    on line
    244

    thanks, marked to my TODO list ??

    Thread Starter bskno

    (@frankmartialarts)

    I found this solution when I was searching online, seems other themes have this issue too, and one of them found and I used, and it worked.

    Thread Starter bskno

    (@frankmartialarts)

    Great, keep DODOing a good work. ??

    • This reply was modified 6 years, 3 months ago by bskno.

    this must be addressed in the theme itself, not changing the PHP version…we will fix in the next version. thanks for help

    Thread Starter bskno

    (@frankmartialarts)

    It might be, but this solution solved the issue.
    Am sure you’ll fix it, hope it won’t be so much change on the next update, so I won’t need to use my backups! ??
    And you’re welcome.

    I will try to break less websites in the next update ??

    I see that error on a LOT of my wordpress installations too! It’s a warning only, so it doesn’t impact sight function, but I can see that since 6 August there are about 800 lines like that for evolve in my error log.

    So it’s important to get that taken care of soon. I’m currently running PHP 7.2.8 on that site, but if there is not going to be a fix with the next release, I might roll back to PHP 7.1 as well.

    Some info here: https://php.net/manual/en/migration72.incompatible.php
    Basically, with PHP 7.2 you can’t use count() in the same way as before. So something to keep in mind with any script writing. PHP 7.1 will reach end of active support already in only 3 months.

    If you know how to fix it, but aren’t ready to push out another release just yet, could you post the correction needed to the functions.php code. I’m thinking this bug got introduced when you were writing a script to address the some of the Font Awesome problems.

    Thread Starter bskno

    (@frankmartialarts)

    That’s a good news. ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning about line 244 on functions.php’ is closed to new replies.