From 291072dfd2cf40e2b9de932ab7616bf2239e84e4 Mon Sep 17 00:00:00 2001 From: towards-a-new-leftypol Date: Tue, 21 Nov 2023 19:47:21 -0500 Subject: [PATCH] Post function - check if we have a delete_token - some board functions can create automatic posts using the post function, such as when you move a thread to another board and it replies with the new thread's id. it doesn't make sense for these posts to have a delete_token, since they shouldn't be in spamnoticer, and a user will never delete them since it is no user's post. - save it as null if it's not present --- inc/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index 298217fe..df4ef2fb 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1085,7 +1085,7 @@ function post(array $post) { $query->bindValue(':slug', NULL); } - if ($config['spam_noticer']['enabled']) { + if ($config['spam_noticer']['enabled'] && isset($post['delete_token'])) { $query->bindValue(':delete_token', $post['delete_token']); } else { $query->bindValue(':delete_token', NULL);