I've attached a new file field to the power menu item where i can upload an image.

If I remove the image, the following error occurs:

Warning: Invalid argument supplied for foreach() in file_field_widget_submit() 
Warning: array_values() expects parameter 1 to be array, null given in file_field_widget_submit()

How to fix:

The problem occurs in funcion power_menu_add_fields_entity_fields() on line 519.
For the field_attach_form(); there must be passed the full $form array instead of $form['power_menu']['fields'].

I'll create a patch.

Comments

daniela basualdo’s picture

Status: Active » Needs review
StatusFileSize
new584 bytes
weri’s picture

Status: Needs review » Fixed

Great, it resolves the problem with some field types. Thank you for the patch!

Is committed: http://drupalcode.org/project/power_menu.git/commit/57f9138394612ffd72a3...

Status: Fixed » Closed (fixed)

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