Invalid argument supplied for foreach()
agrigor1 - January 11, 2009 - 19:15
| Project: | YUI Menu |
| Version: | 6.x-1.1-rc2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | drupalhizmetleri |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
warning: Invalid argument supplied for foreach() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\sites\all\modules\yuimenu\yuimenu.module on line 402
Drupal 6.8 with local library

#1
worked on my local copy with 6.8. Please can you check the YUI Menu Settings page (http://localhost/admin/settings/yuimenu). Is the Root of Menu Tree setted?
#2
Also, please check to make sure that the Access YUI permission is set for the role of the user that is logged in. If it is not, all users who do not have get that error message for all users that that permission set will get that error.
#3
Hi expairiot , still i am getting the warning message:warning: Invalid argument supplied for foreach() in modules\yuimenu\yuimenu.module on line 402.
Why this error happens , its very strange, please help me,Its very critical
Thank u
#4
@exprairiot:
Are you saying that "Access YUI" permissions must be enabled for everyone visiting the site, even guest users? Why is there even a permission for "Access YUI" then?
The root of the menu tree is set at
<Primary Links>for me... for what its worth.#5
#6
Hi,
you can rebuild menu -> http://drupal.org/node/262892
#7
This is not a solution for this issue. The pages load just fine, but the menu itself throws PHP errors.
#8
For me works fine
I was truncate all cache tables and force to use "menu_rebuild();" and yui back to normal
#9
Mine is "back to normal" quite often too... it is an intermittent problem though. I still see the php errors in my logs every hour or so. I'm not going to "truncate my caches" every 5 minutes as a workaround for something that should be fixed. :-)
I'm thinking you aren't understanding, as well: The menu ALWAYS works for me. The logs, however, show php errors like the one this thread is about.