Support » Plugin: LiteSpeed Cache » Invalid argument supplied for foreach

  • Resolved bart2801

    (@bart2801)


    I notice the following warning for some of my pages for logged out users:

    Warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/wp-content/plugins/litespeed-cache/inc/vary.class.php on line 142

    LiteSpeed cache is disabled. This is because my site is under development.

    Googling for the error message shows me other websites having the same error message in the same vary.class.php on the same line 142. So this must be a bug in Litespeed Cache.

    Please fix.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I just setup a test site WP 4.9.5 and LSCWP 2.2.2 , but didn’t see this error.

    could you please be a little more specific on how to reproduce it or how you see it ?

    Best regards,

    The issue is visible on this page:
    https://www.aktivo8.tk/activiteiten/dagje-apenheul-apeldoorn/

    Litespeed Cache is disabled in settings. The issue is only visible when logged out.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    from source code , it seems something to do with comments , are you using any plugin related to comments ?

    also , if you deactivated it in plugin page, instead of disable it in setting , I assume the error will be gone ?

    Best regards

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi @bart2801,

    I’m going to mark this topic “Resolved,” due to lack of activity.

    If you still need help, we’ll be happy to reopen the topic. Please provide the previously requested information, if so.

    Thanks!

    Hi @Iclarke,

    Sorry for the delay. I am not using any plugins related to comments. The error shows no matter if comments are enabled or disabled for the page.
    When the Litespeed Cache plugin is disabled the error disappears but after enabling the plugin the error shows up again.

    Best regards

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    Hi, @bart2801

    It would help if we can take a look at some of your system/plugin settings. Please share the site’s Report Number: Navigate to LiteSpeed Cache > Report, press the Send to LiteSpeed button, make note of the “Report Number”, and post it here so we can look up the report on our end.

    Thanks!

    Report number: IUPIIUBI

    Report date: 06/12/2018 05:06:44

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please submit a ticket here?

    Best regards,

    The ticket I submitted was resolved very quickly. They noticed that another plugin caused the issue by returning a null value in stead of an empty array at a comments_array filter. The culprit was a plugin of my own and I made a quick fix. Problem gone 🙂

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Invalid argument supplied for foreach’ is closed to new replies.