• Resolved braanmcbrutal

    (@braanmcbrutal)


    Hi Woo!

    I have this error appearing in my sidebar:

    Warning: count(): Parameter must be an array or an object that implements Countable in /usr/www/users/vacattczzh/wp-content/themes/vacationista/inc/functions/woocommerce-functions.php on line 95

    The line of code in question is:

    $count = count($product_categories && $product_tags );

    Any ideas?

    The site has a custom built theme with no access to updates unfortunately, so it is something I will need to troubleshoot myself. I’m fairly familiar with PHP, so if you can guide me in the right direction hopefully I can fix it.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @braanmcbrutal,

    Reading contents of the error message you’ve referenced it’s indicating the code error is originating from your custom WordPress theme called vacationista.

    It seems like you’ve found the offending code at line 95 of the file and you’ll now need to spend some time researching how to refactor that code to prevent this error from occurring. If you cannot figure out how to refactor that then removing/commenting that code out maybe another option for you if it’s causing issues on your site.

    Plugin Support Thu P. a11n

    (@thup90)

    Hi there,

    I hope you found the previous reply helpful. We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: count(): error’ is closed to new replies.