Skip to content

Commit 2202cb6

Browse files
Fixed throwing 404 Not Found in CRUD
1 parent d3f025f commit 2202cb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generators/crud2/default/controller.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ protected function findModel(<?= $actionParams ?>) {
227227
if (($model = <?= $modelClass ?>::findOfUser(<?= $condition ?>, ['setScenario' => true])) !== null) {
228228
return $model;
229229
} else {
230-
throw new NotFoundHttpException('The requested page does not exist.');
230+
return new NotFoundHttpException('The requested page does not exist.');
231231
}
232232
}
233233
}

0 commit comments

Comments
 (0)