mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 22:30:27 +08:00
Update FileValidator.php
fix tabs
This commit is contained in:
@ -229,9 +229,9 @@ class FileValidator extends Validator
|
|||||||
*/
|
*/
|
||||||
public function isEmpty($value, $trim = false)
|
public function isEmpty($value, $trim = false)
|
||||||
{
|
{
|
||||||
$value = is_array($value) && !empty($value) ? $value[0] : $value;
|
$value = is_array($value) && !empty($value) ? $value[0] : $value;
|
||||||
|
|
||||||
return !$value instanceof UploadedFile || $value->error == UPLOAD_ERR_NO_FILE;
|
return !$value instanceof UploadedFile || $value->error == UPLOAD_ERR_NO_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user