Closed (fixed)
Project:
Storm
Version:
6.x-1.21
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2009 at 17:48 UTC
Updated:
7 May 2009 at 20:32 UTC
Fresh installation of Storm & Drupal 6. I tried to create a knowledgebase and I got the error:
warning: Invalid argument supplied for foreach() in /var/www/project/includes/form.inc on line 1415.
Thanks
Comments
Comment #1
stodge commentedSorry, this was using Chrome 1.0.154.43.
Comment #2
RockyRoad commentedI got the same error with Storm, but also with backup_migrate/Pgsql.
This warning shows up when #options value, in a form definition, is empty or invalid.
A better error message would possibly help module developers to fix the errors.
The
foreachinstruction expects an array or an object to iterate.I would suggest this patch, in form,inc:
Comment #3
matt v. commentedThe issue appears to be related to the value being loaded in line #197-198 of the stormknowledgebase.module. It wasn't loading the attributes correctly. I figured out a fix, but when I went to create a patch file, I realized that it's already been fixed in the latest DRUPAL-6--1 branch.
I verified the fix by downloading the latest version of the file from CVS. The error then went away and the topics were loaded correctly. Since the fix hasn't made it into an official release yet, I'll leave this issue as active, for now.
Comment #4
Magnity commentedMarked #391956: warning: Invalid argument supplied for foreach() in form.inc on line 1420. as a duplicate of this issue.
A new stable version has been released. Please test for this bug in this version. Thanks.
Comment #5
Magnity commentedChanging priority as per #435504: TODO BEFORE STORM 1.22.
I'll close this one out soon though unless someone reports the error is still present.
Comment #6
Magnity commentedAssuming fixed - please reopen if this bug is still an issue.