Jump to content

Warning: Invalid argument supplied for foreach() in /public_html/classes/Hook.php on line 491


Kst
 Share

Recommended Posts

Hello,

We got an error at the top of some pages:  Warning: Invalid argument supplied for foreach() in /public_html/classes/Hook.php on line 491.

I've read that it could be a problem with the foreach loop or arrays, but I don't know php and don't know how to fix it. 

In line 491 I find: foreach ($results as $result) {

Another problem is that when I enter a category from the client side, I can't go to the 2nd/3rd/4th/5th page, only one page is displayed and the next ones don't want to load. The error Warning: Invalid argument supplied for foreach() in /public_html/classes/Hook.php on line 491 appears on pages that do not want to load.

I also get an error after enabling debug mode:
PrestaShopBundle\EntityTab.    
The association PrestaShopBundle\EntityTab#tabLangs refers to the owning side field PrestaShopBundle\EntityTabLang#tab which does not exist.

Please help me solve the problem, I am also attaching a picture of the code.

 

 

blad hook.png

debug info.png

debug info php.png

Edited by Kst (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More