EC-CUBE / EC-CUBE/ec-cube

LayoutControllerで通らないコードがある

Open
#6,013 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.