• Resolved Beee

    (@beee)


    PHP Warning: Invalid argument supplied for foreach() in /var/www/html/web/app/plugins/ti-woocommerce-wishlist/admin/settings/integrations.class.php on line 77

    You need to add an isset before the foreach to solve this.
    There’s no check if the global variable is an array.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I hope can help someone, open intergrations.class.php and
    at line 77 before the foreach loop, add “if(isset($integrations)){”
    and at line 90 add “}” .

    Thread Starter Beee

    (@beee)

    Thanks for your code but that wasn’t the reason I posted it.
    I know how to fix it. Was more to inform plugin author.

    Plugin Author templateinvaders

    (@templateinvaders)

    Hi @beee and @jim1997,

    Thanks for your reports.

    The main reason of issue that we should change the variable name of some unique because mentioned error happened only when some 3rd party code overwrite it’s value.

    We’ll release update with fix very soon.

    Thread Starter Beee

    (@beee)

    Also don’t forget to check if it’s actually an array…

    Plugin Author templateinvaders

    (@templateinvaders)

    Fixed

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