warning: Invalid argument supplied for foreach() in /var/www/3gbit/sites/default/modules/conditional_fields/conditional_fields.module on line 709.

When I edit the content, and then I got this fault... How to make it right?

CommentFileSizeAuthor
#4 475884.patch1.73 KBjim0203

Comments

vivianspencer’s picture

I'm getting the same error on the beta release

jim0203’s picture

I'm guessing that changing line 708 from

if (!in_array('node_form_build_preview', $form_state['submit_handlers'])) {

to

if ((!in_array('node_form_build_preview', $form_state['submit_handlers'])) && (is_array($form['#field_info'][$row['field_name']]['widget']['default_value']))) {

Would fix this, but I'm new to the code so would value a 2nd opinion.

luisfeng’s picture

Your code works all right, the problem has been fixed... ^^!

jim0203’s picture

StatusFileSize
new1.73 KB
jim0203’s picture

Status: Active » Needs review
peterpoe’s picture

Status: Needs review » Fixed

Your patch is ok, committing. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.