From 4303efaf9ef21c6749e344ff645c27719d7b1653 Mon Sep 17 00:00:00 2001 From: grandeljay Date: Thu, 7 Apr 2022 18:13:58 +0200 Subject: [PATCH] Fix wish edit causing 404 --- src/pages/wish.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/wish.php b/src/pages/wish.php index ebd87a7c..d124bec4 100644 --- a/src/pages/wish.php +++ b/src/pages/wish.php @@ -35,7 +35,7 @@ if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) { $page->messages[] = Page::success(__('Wish successfully updated.'), __('Success')); } -if (!$userIsAuthenticated || !$wish->exists) { +if (!$wish->exists) { $page->errorDocument(404, $wish); } @@ -48,6 +48,10 @@ foreach ($wishlists as $wishlist) { } } +if (!$userIsAuthenticated) { + $page->errorDocument(404, $wish); +} + $page->header(); $page->bodyStart(); $page->navigation();