aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-02-15 23:25:06 +0100
committerLaria Carolin Chabowski <laria@laria.me>2020-02-15 23:25:06 +0100
commit36670080983d1484e1d659a80415957d49405ce2 (patch)
tree18b8f65b65e71545905f4e19ea2d9f91b3709479 /src
parent6b9c3fa57998b2ef74104d20f69ebbd4ee11a9c7 (diff)
downloadmicropoly-36670080983d1484e1d659a80415957d49405ce2.tar.gz
micropoly-36670080983d1484e1d659a80415957d49405ce2.tar.bz2
micropoly-36670080983d1484e1d659a80415957d49405ce2.zip
NoteHandler: Check delete flag properly
It is not always set, resulting in an E_NOTICE. isset() deals with this case.
Diffstat (limited to 'src')
-rw-r--r--src/Handlers/NoteHandler.php2
1 files changed, 1 insertions, 1 deletions
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();