diff --git a/api/src/Mail.php b/api/src/Mail.php index 0f32103346..20b10d5be3 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -1512,7 +1512,9 @@ class Mail } else { - $sortResult = (is_array($_thisUIDOnly) ? $_thisUIDOnly:(array)$_thisUIDOnly); + $sortResult = (array)$_thisUIDOnly; + // we must return a total: if we return only certain UIDs, the total is the number of UIDs given + $total = count($sortResult); }