1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-09 17:06:12 +00:00

Ignore messages with invalid mailboxID into smsmapper

This commit is contained in:
Loic Blot 2015-02-16 13:42:52 +00:00
parent 77a9e9cccf
commit 05ccdeb650

View File

@ -42,6 +42,10 @@ class SmsMapper extends Mapper {
$smsList = array();
while($row = $result->fetchRow()) {
// This case may not arrive, but we test if the DB is consistent
if (!in_array($row["sms_mailbox"], SmsMapper::$mailboxNames)) {
continue;
}
$mbox = SmsMapper::$mailboxNames[$row["sms_mailbox"]];
if (!isset($smsList[$mbox])) {
$smsList[$mbox] = array();
@ -61,6 +65,10 @@ class SmsMapper extends Mapper {
$smsList = array();
while($row = $result->fetchRow()) {
// This case may not arrive, but we test if the DB is consistent
if (!in_array($row["sms_mailbox"], SmsMapper::$mailboxNames)) {
continue;
}
$mbox = SmsMapper::$mailboxNames[$row["sms_mailbox"]];
if (!isset($smsList[$mbox])) {
$smsList[$mbox] = array();