Bug #6209

Not uploading a file for a resource leads to an error

Added by Karsten Dambekalns over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-01-25
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Property
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 8
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

Try creating a post without uploading a file and you'll get a nice exception:

#1259748358: A valid sha1 hash must be passed to this constructor.

The "uploaded file" has an error status of UPLOAD_ERR_NO_FILE, so this need to be checked and handled accordingly.

Associated revisions

Revision 4c5a8088
Added by Karsten Dambekalns over 5 years ago

[+BUGFIX] FLOW3 (Property): PropertyMapper::transformToObject() now returns the result of an object converter call if it is NULL or an object. If an error object is returned, it returns NULL and adds the error to the mapping results. Fixes #6209.
[~TASK] FLOW3 (Resource): The ResourceObjectConverter now returns NULL if no file was uploaded. In case an upload error occurred or the file extension was rejected an Error object is returned (formerly it would return FALSE or throw an exception respectively). Related to #6209.
[+FEATURE] FLOW3 (Utility): Added getUploadErrorMessage() to Files.

History

#1 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from New to Accepted
  • Assigned To changed from Robert Lemke to Karsten Dambekalns
  • Target version set to 1.0 alpha 8

#2 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3757.

Also available in: Atom PDF