mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 20:59:23 +02:00
Merge pull request #7736 from andrewandante/BUGFIX/filefield_validation
check for UPLOAD_ERR_NO_FILE on FileField::saveinto
This commit is contained in:
commit
d615da0e99
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user