Skip to content

Commit

Permalink
Merge pull request #5685 from takeuji/file-upload-errors-fix
Browse files Browse the repository at this point in the history
ファイルのアップロード時にエラーメッセージを重複して表示しないように修正
  • Loading branch information
chihiro-adachi authored Aug 29, 2022
2 parents be17f58 + 68c7b6d commit 90f19be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Eccube/Controller/Admin/Content/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ public function upload(Request $request)
throw new UnsupportedMediaTypeHttpException(trans('admin.content.file.dotfile_error'));
}
} catch (UnsupportedMediaTypeHttpException $e) {
$this->errors[] = ['message' => $e->getMessage()];
if (!in_array($e->getMessage(), array_column($this->errors, 'message'))) {
$this->errors[] = ['message' => $e->getMessage()];
}
continue;
}
try {
Expand Down

0 comments on commit 90f19be

Please sign in to comment.