Skip to content
Snippets Groups Projects
Commit 61228cfe authored by Kenneth Ezekiel's avatar Kenneth Ezekiel
Browse files

fix: redirect to home if access empty film id

parent 30b377b1
No related merge requests found
......@@ -57,6 +57,9 @@ class FilmController extends BaseController
}
} elseif ($uri == '/film-details') {
$data['film'] = $this->service->getById($_GET['film_id']);
if (!$data['film']) {
parent::redirect("/", []);
}
if (isset($_SESSION['user_id'])) {
$data['isFavorite'] = $this->favorite_handler->isUserFavorite($_SESSION['user_id'], $_GET['film_id']);
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment