LayoutControllerで通らないコードがある
Open
bug
Status: needs-review
- Dominant language
- PHP
- Stars
- 788
- Forks
- 719
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 39
Description
### 概要(Overview)
LayoutControllerにて、以下のようにNoResultExceptionをキャッチしている箇所があるが、findメソッドは例外を投げないため通らない。
```
// プレビューする画面を取得
try {
$Page = $this->pageRepository->find($previewPageId);
} catch (NoResultException $e) {
throw new NotFoundHttpException();
}
```
https://github.com/EC-CUBE/ec-cube/blob/4.2/src/Eccube/Controller/Admin/Content/LayoutController.php#L206
### 再現手順(Procedure)
コード上の確認のみです。
dtb_pageの `id :0`のレコードを削除すれば再現するかと思われます。
### 環境(Environment)
EC-CUBE: 4.2
Contributor guide
Assessment
This issue has not been assessed yet.