yii-dream-team/yii2-upload-behavior

array_filter return false

Opened this issue · 1 comments

array_filter([$this->file->baseName, $this->file->extension])

If filename will "0.jpg", your extension save "jpg" in attribute holder because

PHP Doc:

If no callback is supplied, all entries of array equal to FALSE (see converting to boolean) will be removed.

you can add callback function() { return true; }

but I don't understand for what you using array_filter