Parcourir la source

sort and startMessage were being set from $_GET without checking to make sure they were present. When deleting a message from a search, sort and startMessage weren't a part of $_GET.

tassium il y a 22 ans
Parent
commit
e284519080
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      src/delete_message.php

+ 7 - 2
src/delete_message.php

@@ -32,8 +32,13 @@ if (isset($_GET['saved_draft'])) {
 if (isset($_GET['mail_sent'])) {
     $mail_sent = urlencode($_GET['mail_sent']);
 }
-$sort = (int) $_GET['sort'];
-$startMessage = (int) $_GET['startMessage'];
+if (isset($_GET['sort'])) {
+	$sort = (int) $_GET['sort'];
+}
+
+if (isset($_GET['startMessage'])) {
+	$startMessage = (int) $_GET['startMessage'];
+}
 
 if(isset($_GET['where'])) {
     $where = urlencode($_GET['where']);