Skip to content

Commit

Permalink
FIx PHP8 warning (#9071)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Jul 23, 2023
1 parent d2e020a commit 1501ca4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions program/actions/mail/mark.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ public function run($args = [])
$read_deleted = (bool) $rcmail->config->get('read_when_deleted');
$flag = self::imap_flag($flag);
$old_count = 0;
$from = $_POST['_from'] ?? null;

if ($flag == 'DELETED' && $skip_deleted && (!isset($_POST['_from']) || $_POST['_from'] != 'show')) {
if ($flag == 'DELETED' && $skip_deleted && $from != 'show') {
// count messages before changing anything
$old_count = $rcmail->storage->count(null, $threading ? 'THREADS' : 'ALL');
}
Expand Down Expand Up @@ -79,7 +80,7 @@ public function run($args = [])

if (!$marked) {
// send error message
if (empty($_POST['_from']) || $_POST['_from'] != 'show') {
if ($from != 'show') {
$rcmail->output->command('list_mailbox');
}

Expand Down Expand Up @@ -110,7 +111,7 @@ public function run($args = [])
$rcmail->output->set_env('last_flag', $flag);
}
else if ($flag == 'DELETED' && $skip_deleted) {
if ($_POST['_from'] == 'show') {
if ($from == 'show') {
if ($next = rcube_utils::get_input_value('_next_uid', rcube_utils::INPUT_GPC)) {
$rcmail->output->command('show_message', $next);
}
Expand Down

0 comments on commit 1501ca4

Please sign in to comment.