From bc84cdc59eedad8a904c34b81f0fce55579500ed Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 18 Oct 2021 11:33:14 -0700 Subject: [PATCH] Issue #4578 - possible fix for editing issue. --- e107_plugins/forum/forum_post.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index adb3d2388..741f5cc20 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -1463,7 +1463,7 @@ class forum_post_handler $mes = e107::getMessage(); - if (empty($_POST['subject']) || empty($_POST['post'])) + if ((isset($_POST['subject']) && empty($_POST['subject'])) || empty($_POST['post'])) { $mes->addError(LAN_FORUM_3007); return; @@ -1507,7 +1507,11 @@ class forum_post_handler $postVals['post_edit_user'] = USERID; $postVals['post_entry'] = $_POST['post']; - $threadVals['thread_name'] = $_POST['subject']; + if(!empty($_POST['subject'])) + { + $threadVals['thread_name'] = $_POST['subject']; + } + $threadVals['thread_sticky'] = (MODERATOR ? (int)$_POST['threadtype'] : 0); $this->forumObj->threadUpdate($this->data['post_thread'], $threadVals);