Merge pull request #7736 from andrewandante/BUGFIX/filefield_validation

check for UPLOAD_ERR_NO_FILE on FileField::saveinto
This commit is contained in:
Damian Mooyman 2018-01-08 15:04:53 +13:00 committed by GitHub
commit d615da0e99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ class FileField extends FormField implements FileHandleField
*/
public function saveInto(DataObjectInterface $record)
{
if (!isset($_FILES[$this->name])) {
if (!isset($_FILES[$this->name]['error']) || $_FILES[$this->name]['error'] == UPLOAD_ERR_NO_FILE) {
return;
}