mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Bugfix: iSpamScore should be int, not float
This commit is contained in:
parent
3950ff049c
commit
35433ca5b0
1 changed files with 1 additions and 1 deletions
|
|
@ -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]}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue