There is an "Undefined offset: 0 in media_add_upload_submit() (line 140... in media/includes/media.pages.inc" when you are using the workbench_media module to upload a file though the media_add_upload_form.

The $params = $form_state['build_info']['args'][0]; never checks if the the form_state build info is set or not and there is nothing in the following code that requires it to be set so we need to add a isset() around it.

Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dddave’s picture

I wasn't able to recreate this with the latest dev of media and workbench_media 1.0. Do you still have this issue WITHOUT the patch? Or was this committed during the last weeks?

bobodrone’s picture

Status: Needs review » Closed (fixed)

Yes, you are right. This issue is fixed in: http://drupalcode.org/project/media.git/commitdiff/f69429bcc3ba979e803ec...

A slightly better variant than my suggestion with $params = isset($form_state['build_info']['args'][0]) ? $form_state['build_info']['args'][0] : array();
:) Closing this now.

/ bobodrone

dzoll7’s picture

Status: Closed (fixed) » Active

I'm experiencing the same bug with version 7.2-1.2, and it doesn't look like the changes mentioned in #2 were ever applied to 1.x.

What is the procedure for having this fixed in 1.x? (Sorry if reopening the issue was the wrong thing to do; I'm still learning procedures/etiquette here.)

ParisLiakos’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

yeap we should get this patch in 1.x as well, if the bug exists there

Simon Georges’s picture

Status: Active » Patch (to be ported)
ParisLiakos’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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