From 754777d69e0dcf96c87f39b1b2d046029dd2b571 Mon Sep 17 00:00:00 2001 From: NOrtmann1 Date: Mon, 1 Jun 2026 11:49:36 +0200 Subject: [PATCH] Update showArticle-controller.php --- php/controller/showArticle-controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/php/controller/showArticle-controller.php b/php/controller/showArticle-controller.php index 79b5e9e..38d69ee 100644 --- a/php/controller/showArticle-controller.php +++ b/php/controller/showArticle-controller.php @@ -15,12 +15,16 @@ if (isset($_GET["id"])){ $author = $article->getAuthor(); $tags = $article->getTags(); }else{ - $_SESSION["message"] = "article_not_found"; + header("location: ../../index.php?pfad=404"); + exit(); } } catch (Exception $e){ $_SESSION["message"] = "internal_error"; + header("location: ../../index.php?pfad=showArticle"); + exit(); } }else{ - $_SESSION["message"] = "article_not_found"; + header("location: ../../index.php?pfad=404"); + exit(); } ?> \ No newline at end of file