Closed (fixed)
Project:
Navigate
Version:
6.x-1.0
Component:
Code (PHP)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2009 at 08:47 UTC
Updated:
9 Oct 2012 at 08:11 UTC
I received the following warning after enabling the navigation module:
warning: Invalid argument supplied for foreach() in /drupal/sites/all/modules/navigate/navigate_search/navigate_search.module on line 253.
warning: Invalid argument supplied for foreach() in /drupal/sites/all/modules/navigate/navigate_search/navigate_search.module on line 253.
Comments
Comment #1
pnigro commentedI experienced the same thing.
Comment #2
markhalliwellIs this still the case? I will need a little more information so I can track this down if it is. I have not seen any issues when enabling/installing the dev version of this module. Perhaps your can try uninstalling the module after you disable it. Then reinstall it. This will delete navigates tables from your database and install new ones.
Comment #3
briandmiller commentedI had this too. Tried disabling, uninstalling, updating to latest dev and reinstalling. Still get the same error.
Comment #4
markhalliwellHave you tried installing Navigate (the module) first and then installing the widgets? I am still trying to figure out what could be happening.
Comment #5
marthus commentedI received the following warning after enabling the navigation module:
warning: Invalid argument supplied for foreach() in /drupal/sites/all/modules/navigate/navigate_search/navigate_search.module on line 253.
I tried to reinstall and no good. I see that others have had it but I can't find a resolution posted. Is there a fix?
Comment #6
marthus commentedI don't know why but I just got it all to work and the Warning message is gone. After installing and uninstalling the dev version three times to no avail (enabling, running PHP and Cron each time) what I thought to do was uninstall it again and then I installed the beta6 version. I still got the Warning message above when I enabled the beta6 module; however, I then updated the beta6 module to the dev version ( installed the dev over the beta6) ran PHP update and Cron and everything works fine! I'm not a programmer so I've no idea why it worked or if it was a coincidence but I'm just excited that it works as the module is really awesome. Thanks!
Comment #7
amitgoyal commentedThere are no such errors in 6.x-1.0 so marking this fixed.
Comment #8
frederickjhI am getting this same message from drush when I enable or disable other modules. It always is repeated three times.
Invalid argument supplied for foreach() navigate_search.module:253 [warning]
Invalid argument supplied for foreach() navigate_search.module:253 [warning]
Invalid argument supplied for foreach() navigate_search.module:253 [warning]
Navigate Module info from drush:
Extension : navigate
Project : navigate
Type : module
Title : Navigate
Description : Adds a framework for supplying navigation tools to Drupal
Version : 6.x-1.0
Package : Navigate
Core : 6.x
PHP : 4.3.5
Status : enabled
Path : sites/all/modules/navigate
Schema version : 1
Requires : none
Required by : navigate_custom, navigate_favorites, navigate_menu, navigate_search
Please contact me if you need more information to correct this but my guess is that there is something no right about the foreach() statement.
You might find these links helpful in solving this problem.
PHP Warning: Invalid argument supplied for foreach()
Invalid argument supplied for foreach()
foreach on php.net
Lines 248-257 of navigate_search.module
My PHP is not that strong but could it be that you are not declaring $settings as an array before the foreach() ?
Comment #9
amitgoyal commentedThanks @frederickjh for filing and explaining the issue in detail. We have added the extra checks to fix this issue. You can download 6.x-1.x-dev now to get the updated code and we will release 6.x-1.1 later.