Add 404 for wishlists
This commit is contained in:
parent
f16bf3358b
commit
add4c0f829
1 changed files with 10 additions and 1 deletions
|
@ -17,7 +17,16 @@ $wishlist = $database->query('SELECT * FROM `wishlists`
|
|||
WHERE `hash` = "' . $_GET['wishlist'] . '"')
|
||||
->fetch();
|
||||
|
||||
$products = $user->getProducts($wishlist['id']);
|
||||
if ($wishlist) {
|
||||
$products = $user->getProducts($wishlist['id']);
|
||||
} else {
|
||||
http_response_code(404);
|
||||
?>
|
||||
<h1>Not found</h1>
|
||||
<p>The requested Wishlist was not found and likely deleted by its creator.</p>
|
||||
<?php
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
||||
<main>
|
||||
|
|
Loading…
Reference in a new issue