Warning: count(): Parameter must be an array or an object that implements Counta

WPPizza – A Restaurant Plugin for WordPress Support General Support Warning: count(): Parameter must be an array or an object that implements Counta

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45846
    jonjj
    Participant

      Hi Olly

      I’m starting to get this error on my websites where WPPizza is installed. It happends when the cart is apllied on the page.

      Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/husetvedhavet.dk/public_html/wp-content/plugins/wppizza/inc/frontend.require.loop-query.inc.php on line 60

      You can see it here:
      Link http://husetvedhavet.dk/designer-stones/

      I also have the same error here:

      Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/housebythesea.dk/public_html/wp-content/plugins/wppizza/classes/class.wppizza.sessions.php on line 283

      Link http://housebythesea.dk/designer-stones/

      I was hoping that maybe you know a solution to this?

      Thank you in advance

      #45848
      Olly
      Admin & Mod

        some general things
        – i would think you just updated to php 7.x
        – you should never output this things but log them instead see enable debug here https://docs.wp-pizza.com/troubleshooting/
        – your first site you are referring to is using an about 2 and a half year old version of wppizza
        – i cannot see this warning on your second site

        in particular:
        although i can quite easily get rid of this warning too (and will do) in the next update
        my guess would be there’s something underlying that’s not quite right, like either your php sessions dont work and/or you have no gateway enabled (although by default that should not cause any issues either) or some other things have been disabled perhaps ?! (I cannot tell – as mentioned, i cannot see this issue on your second site to start off with)

        #45859
        jonjj
        Participant

          Hi Olly

          Thanks so much for the quick response.
          Yes you are right, it’s a 7.x PHP site.

          Thanks for the quick new update and debug advice. That was impressive. It fixed the issue on the second site where I upgraded to the latest pizza 3.x.
          Ill do the same on the other site too next week and the errors should be fixed.

          Much appreciated

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘Warning: count(): Parameter must be an array or an object that implements Counta’ is closed to new replies.