Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
warning: Invalid argument supplied for foreach() in /home/kystene/public_html/sites/all/modules/webform/webform.module on line 451.
At first, this was an upgrade of the module that I had disabled some time ago. I got that error, so I disabled and uninstalled before reinstalling. I am still getting the error when saving a webform.
Comments
Comment #1
kew0282 CreditAttribution: kew0282 commentedI get the same problem--I am trying to install it for the first time
Comment #2
aitchm CreditAttribution: aitchm commentedMe too. I installed yesterday and when testing today I get the message after attempting to add the first component to a form.
Comment #3
wescoughlin CreditAttribution: wescoughlin commentedSame here. Anyone know anything about it? Seems like things still work ok.
Comment #4
chicagoshark CreditAttribution: chicagoshark commentedI am facing this issue also. Downloaded and installed WebForms today. I really liked the functionality, but the warning message showing here will be a show stopper...
Comment #5
quicksketchHas anyone tested out the 1.x latest version to see if the problem still exists in the latest copy? I think this may have already been fixed.
Comment #6
yopyop CreditAttribution: yopyop commentedI also have this issue, using drupal 5.5 and the latest webform 1.8.
Comment #7
quicksketch@yopyop, could you try out the 1.x development version and report if the problem still exists there?
Comment #8
Nikkol CreditAttribution: Nikkol commentedIn my particular case, I saved the webform without having any fields added to it. Once I added a field, the error went away. Those who have posted here should check this. While the error should be fixed, it really was nothing more than a minor annoyance for me.
Comment #9
rfranquet CreditAttribution: rfranquet commentedI cheked the 5.x-1.x-dev 2008-Feb-01 130.48 KB release and this issue has been fixed in my website.
Comment #10
dualdiesel CreditAttribution: dualdiesel commentedGot this error as well. try to move forward...
Set up a web form and upon trying to submit a text field I received the following error
even though my index.php file is set to 777
: (
You don't have permission to access /index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.37 Server at iamdrugs.com Port 80
Comment #11
quicksketchdualdiesel, hmm sounds like a separate problem than the foreach() error, which I'll consider fixed with rfranquet's confirmation.
Comment #12
lego1974 CreditAttribution: lego1974 commentedThe reason this warning arises is because in many cases (the first time you create a webform), $node->webformcomponents is NULL. The value of the variable needs to be checked before performing operations on it. This isn't a gigantic issue, but it's generally not a good idea, because it has the potential to lead to unexpected behavior.
simply modifying line 451from this:
to this:
Should do the trick.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.