@@ -108,8 +108,9 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | $render = $page->render(); |
| 111 | - if ($render === false) |
|
| 112 | - throw new \yii\web\HttpException(404, 'No template found'); |
|
| 111 | + if ($render === false) { |
|
| 112 | + throw new \yii\web\HttpException(404, 'No template found'); |
|
| 113 | + } |
|
| 113 | 114 | |
| 114 | 115 | \Neon::endProfile('COBE::RENDER_ACTION', 'cobe'); |
| 115 | 116 | |
@@ -153,11 +154,13 @@ discard block |
||
| 153 | 154 | { |
| 154 | 155 | $request = neon()->request; |
| 155 | 156 | $url = $request->get('page'); |
| 156 | - if (!$url) |
|
| 157 | - $this->pageNotFound(); |
|
| 157 | + if (!$url) { |
|
| 158 | + $this->pageNotFound(); |
|
| 159 | + } |
|
| 158 | 160 | $urlEntry = CmsUrl::findByUrl($url); |
| 159 | - if ($urlEntry) |
|
| 160 | - return $this->actionPage($urlEntry['nice_id']); |
|
| 161 | + if ($urlEntry) { |
|
| 162 | + return $this->actionPage($urlEntry['nice_id']); |
|
| 163 | + } |
|
| 161 | 164 | $this->pageNotFound(); |
| 162 | 165 | } |
| 163 | 166 | |