From 35433ca5b0d14f28e9ee7d52b937dff3d03331a6 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 8 Nov 2021 20:51:53 +0100 Subject: [PATCH] Bugfix: iSpamScore should be int, not float --- snappymail/v/0.0.0/app/libraries/MailSo/Mail/Message.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5863f880f..e2bb0a9a0 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 @@ -446,7 +446,7 @@ class Message implements \JsonSerializable if ($spam = $oHeaders->ValueByName(\MailSo\Mime\Enumerations\Header::X_SPAMD_RESULT)) { if (\preg_match('/\\[([\\d\\.-]+)\\s*\\/\\s*([\\d\\.]+)\\];/', $spam, $match)) { if ($threshold = \floatval($match[2])) { - $this->iSpamScore = \max(0, \min(100, 100 * \floatval($match[1]) / $threshold)); + $this->iSpamScore = \intval(\max(0, \min(100, 100 * \floatval($match[1]) / $threshold))); $this->sSpamResult = "{$match[1]} / {$match[2]}"; } }