Skip to content

Commit

Permalink
Set $num in case loop returns nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
shawniverson committed Sep 2, 2024
1 parent 01ffc83 commit 7006c78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mailscanner/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3583,6 +3583,7 @@ function quarantine_release($list, $num, $to, $rpc_only = false)

// Check for [-1], indicating just to release message itself, regardless of its item position
if ($num[0] === -1) {
$num = [0];
// Locate message in items
for ($index=0;$index<count($list);$index++) {
if (preg_match('/message\/rfc822/', $list[$index]['type'])) {
Expand Down Expand Up @@ -3717,6 +3718,7 @@ function quarantine_learn($list, $num, $type, $rpc_only = false)

// Check for [-1], indicating just to release message itself, regardless of its item position
if ($num[0] === -1) {
$num = [0];
// Locate message in items
for ($index=0;$index<count($list);$index++) {
if (preg_match('/message\/rfc822/', $list[$index]['type'])) {
Expand Down

0 comments on commit 7006c78

Please sign in to comment.