From adf1086c03cee03d3d3cd85b1042e78a17b8d082 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 8 Nov 2021 20:56:18 +0100 Subject: [PATCH] Missed two iSpamScore to be int instead of float --- snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php index e2bb0a9a0..e6b34b0cc 100644 --- a/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php +++ b/snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php @@ -455,14 +455,14 @@ class Message implements \JsonSerializable $this->sSpamResult = $spam; $this->bIsSpam = !!\preg_match('/yes|spam/', $spam); if (\preg_match('/spamicity=([\\d\\.]+)/', $spam, $spamicity)) { - $this->iSpamScore = \max(0, \min(100, \floatval($spamicity[1]))); + $this->iSpamScore = \intval(\max(0, \min(100, \floatval($spamicity[1])))); } } else if ($spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAM_STATUS)) { $this->sSpamResult = $spam; if (\preg_match('/(?:hits|score)=([\\d\\.-]+)/', $spam, $value) && \preg_match('/required=([\\d\\.-]+)/', $spam, $required)) { if ($threshold = \floatval($required[1])) { - $this->iSpamScore = \max(0, \min(100, 100 * \floatval($value[1]) / $threshold)); + $this->iSpamScore = \intval(\max(0, \min(100, 100 * \floatval($value[1]) / $threshold))); $this->sSpamResult = "{$value[1]} / {$required[1]}"; } }