Passed
Push — neill-page-redirect-fixes ( f17ed8...d2b06d )
by Neill
20:03
created
neon/cms/controllers/RenderController.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,8 +108,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.