From 36670080983d1484e1d659a80415957d49405ce2 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sat, 15 Feb 2020 23:25:06 +0100 Subject: NoteHandler: Check delete flag properly It is not always set, resulting in an E_NOTICE. isset() deals with this case. --- src/Handlers/NoteHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Handlers/NoteHandler.php b/src/Handlers/NoteHandler.php index aa1cf78..4ce3179 100644 --- a/src/Handlers/NoteHandler.php +++ b/src/Handlers/NoteHandler.php @@ -23,7 +23,7 @@ class NoteHandler implements Handler } if ($_SERVER["REQUEST_METHOD"] === "POST") { - if ($_POST["delete"] === "delete") { + if (isset($_POST["delete"]) && $_POST["delete"] === "delete") { $note->delete($db); http_response_code(303); $url = $env->documentRoot(); -- cgit v1.2.3-70-g09d2