Skip to content

Commit

Permalink
select_file に空のパラメータを渡せないよう修正
Browse files Browse the repository at this point in the history
- `select_file=` にすると user_data 以下が削除されてしまう
- `is_null()` に空文字を渡すと false になるため `===` で判定する
  • Loading branch information
nanasess committed Feb 9, 2022
1 parent a446f03 commit 8ef8d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Eccube/Controller/Admin/Content/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public function delete(Request $request)
$this->isTokenValid();

$selectFile = $request->get('select_file');
if (is_null($selectFile) || $selectFile == '/') {
if ($selectFile === '' || $selectFile === null || $selectFile == '/') {
return $this->redirectToRoute('admin_content_file');
}

Expand Down

0 comments on commit 8ef8d57

Please sign in to comment.