From fc6f95de8fab621039721434e9183329f68c8ff9 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 18 Apr 2024 15:40:52 +0100 Subject: [PATCH] [blocks] 'delete' param isn't required --- ext/blocks/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/blocks/main.php b/ext/blocks/main.php index c3bc5ac8..12eced72 100644 --- a/ext/blocks/main.php +++ b/ext/blocks/main.php @@ -79,7 +79,7 @@ class Blocks extends Extension $page->set_redirect(make_link("blocks/list")); } if ($event->page_matches("blocks/update", method: "POST", permission: Permissions::MANAGE_BLOCKS)) { - if (!empty($event->req_POST('delete'))) { + if (!is_null($event->get_POST('delete'))) { $database->execute(" DELETE FROM blocks WHERE id=:id