Fix wish edit causing 404

This commit is contained in:
grandeljay 2022-04-07 18:13:58 +02:00
parent 71a35338d6
commit 4303efaf9e

View file

@ -35,7 +35,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
$page->messages[] = Page::success(__('Wish successfully updated.'), __('Success')); $page->messages[] = Page::success(__('Wish successfully updated.'), __('Success'));
} }
if (!$userIsAuthenticated || !$wish->exists) { if (!$wish->exists) {
$page->errorDocument(404, $wish); $page->errorDocument(404, $wish);
} }
@ -48,6 +48,10 @@ foreach ($wishlists as $wishlist) {
} }
} }
if (!$userIsAuthenticated) {
$page->errorDocument(404, $wish);
}
$page->header(); $page->header();
$page->bodyStart(); $page->bodyStart();
$page->navigation(); $page->navigation();