Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-1.x-dev
Component:
optionwidgets.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2008 at 10:34 UTC
Updated:
14 Jun 2008 at 11:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
coltraneI get the same error on 6.x-1.0-dev as well. I'm in the process of trying to debug this and so far I've narrowed it down to optionwidgets_data2form() returning:
when it should be
The latter is what the $element contains when using an on/off text field, using the buttons returns an empty element in #value which causes the PHP error.
Comment #2
coltraneHere's a patch against 6.x-1.x-dev that corrects the PHP warning.
The problem was in optionwidgets_data2form(). The reset() returns FALSE if the array is empty, which it is, but we need an empty array, not false when the field is first added.
This might not be the best fix but I'm not able to dive deeper into the code at the moment.
Comment #3
coltranehttp://drupal.org/node/241691 was marked a duplicate of this
Comment #4
karens commentedI couldn't create a situation that produced this error, but I can see that the possibility exists, so I've committed the patch. Thanks!
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.