zendframework/zf2 — pull request #6423 by hschletz (2014-06-27 12:16:58+00:00)
Title: Validate uploaded filename only if no upload error occured.

Most file upload errors (in particular UPLOAD_ERR_NO_FILE) yield an empty filename. The UploadFile validator does not report the original error in that case, but FILE_NOT_FOUND instead.

This fix validates the filename only in case of UPLOAD_ERR_OK. Any other error code will be reported correctly.