diff --git a/posting.php b/posting.php
index d493e6a83..84d457a96 100644
--- a/posting.php
+++ b/posting.php
@@ -579,6 +579,8 @@ if ($userdata['user_level'] == GROUP_MEMBER || IS_AM) {
}
}
+// Assign posting title & hidden fields
+$page_title = '';
$hidden_form_fields = '';
switch ($mode) {
diff --git a/privmsg.php b/privmsg.php
index 175b9286a..6755d28e9 100644
--- a/privmsg.php
+++ b/privmsg.php
@@ -1097,14 +1097,24 @@ if ($mode == 'read') {
$template->assign_block_vars('switch_privmsg', []);
$template->assign_var('POSTING_USERNAME');
- $post_a = ' ';
- if ($mode == 'post') {
- $post_a = $lang['SEND_A_NEW_MESSAGE'];
- } elseif ($mode == 'reply') {
- $post_a = $lang['SEND_A_REPLY'];
- $mode = 'post';
- } elseif ($mode == 'edit') {
- $post_a = $lang['EDIT_MESSAGE'];
+ //
+ // Assign posting title & hidden fields
+ //
+ $post_a = false;
+ switch ($mode) {
+ case 'post':
+ $post_a = $lang['SEND_A_NEW_MESSAGE'];
+ break;
+ case 'reply':
+ $post_a = $lang['SEND_A_REPLY'];
+ $mode = 'post';
+ break;
+ case 'edit':
+ $post_a = $lang['EDIT_MESSAGE'];
+ break;
+ default:
+ pm_die($lang['NONE_SELECTED']);
+ break;
}
$s_hidden_fields = '';