Fix type error when reading price from emails
authorCameron Ball <cameron@cameron1729.xyz>
Tue, 8 Jan 2019 08:10:57 +0000 (16:10 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Tue, 8 Jan 2019 08:10:57 +0000 (16:10 +0800)
src/common.php

index 7a15a6c..ab0dd8d 100644 (file)
@@ -501,7 +501,7 @@ function getMessagesFromInbox($inbox, array $rules, $unseenOnly = true) {
                     'id' => substr(md5($body), 0, 6),
                     'uid' => $emails[0],
                     'due' => new DateTimeImmutable($dateTransform($matches['due'])),
-                    'amount' => $matches['amount']
+                    'amount' => (float)$matches['amount']
                 ];
             },
             $rules,