Skip to content

Commit db42022

Browse files
authored
ファイルのアップロードに失敗した状態でfileExtバリデーションを実行するとエラーになる (#4114)
1 parent fbf6278 commit db42022

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/baser-core/src/Model/Validation/BcValidation.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ public static function fileExt($file, $exts)
271271
} elseif(is_array($file)) {
272272
$fileName = $file['name'];
273273
$type = $file['type'];
274+
if ($file['error']) {
275+
return __d('baser_core', 'ファイルのアップロードに失敗したため、拡張子の判定に失敗しました。');
276+
}
274277
} else {
275278
$fileName = $file;
276279
$type = null;

0 commit comments

Comments
 (0)