Development

#7621 (sfWidgetFormInputFileEditable broken in symfony 1.3-RC1)

You must first sign up to be able to contribute.

Ticket #7621 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

sfWidgetFormInputFileEditable broken in symfony 1.3-RC1

Reported by: geecu Assigned to: fabien
Priority: major Milestone:
Component: form Version: 1.3.0 RC1
Keywords: Cc:
Qualification: Unreviewed

Description

When editing a record that has a file uploaded, submiting the form without uploading a new file deletes the old file.

This happens because processUploadedFile returns an empty string when no file was uploaded:

  if (!$values[$field])
   {
     $oldValues = $this->getObject()->getModified(true, false);

     return isset($oldValues[$field]) ? $oldValues[$field] : '';
   }

This used to return the old value ($this->object->$field).

This bug was introduced in 1.3-RC1, which is not available in the bug version dropdown.

Change History

11/18/09 11:08:33 changed by FabianLange

  • version set to 1.3.0 RC1.

11/18/09 12:59:02 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [24132]) [1.3, 1.4] fixed sfWidgetFormInputFileEditable (closes #7621)

11/23/09 15:07:57 changed by theredled

  • status changed from closed to reopened.
  • resolution deleted.

This also appears in the lastest 1.2 !

11/23/09 15:31:06 changed by FabianLange

  • status changed from reopened to closed.
  • resolution set to fixed.

for 1.2 in r24269