menu.php error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tyofcore
Forum Newbie
Posts: 6
Joined: Tue Jun 05, 2007 10:14 am

menu.php error

Post by Tyofcore »

Hello, ive been in the process of changing webhosts this week, I use joomla to build my site, loaded a template I had planned on using, but it had a menu in a spot where I didnt like, so deleted the module, now when i load my page up to view, i receive this error at the top of my site:

Warning: Invalid argument supplied for foreach() in /home/tyofcore/public_html/main/templates/jw_getty/menu/menu.php on line 64

Site still loads up, it just shows this error line at the very top.

joomla version 1.5 and i got the template off joomlaweb template is jw getty, if you needed to know which one.

if more info is needed lemme know and i will try to get it up there as soon as i can.

Thanks
Ty
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: menu.php error

Post by Eran »

We would need to see the code in menu.php, line 64 to know...
probably a foreach loop running on a variable that isn't an array. A check before the loop (is_array) should remove this error
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: menu.php error

Post by Benjamin »

Can't you just turn off the menu via the admin panel? I would think that would be the proper solution rather than just deleting files and breaking the code base.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: menu.php error

Post by RobertGonzalez »

That file that is throwing the error is trying to do array work on a non array. That is why you are getting that error.

I say go with astions' suggestion and see if you can handle that through a GUI of some sort.
Post Reply