mirror of
				https://github.com/nerzhul/ocsms.git
				synced 2025-10-31 10:27:42 +00:00 
			
		
		
		
	Ignore messages with invalid mailboxID into smsmapper
This commit is contained in:
		
							parent
							
								
									77a9e9cccf
								
							
						
					
					
						commit
						05ccdeb650
					
				| @ -42,6 +42,10 @@ class SmsMapper extends Mapper { | |||||||
| 
 | 
 | ||||||
| 		$smsList = array(); | 		$smsList = array(); | ||||||
| 		while($row = $result->fetchRow()) { | 		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"]]; | 			$mbox = SmsMapper::$mailboxNames[$row["sms_mailbox"]]; | ||||||
| 			if (!isset($smsList[$mbox])) { | 			if (!isset($smsList[$mbox])) { | ||||||
| 				$smsList[$mbox] = array(); | 				$smsList[$mbox] = array(); | ||||||
| @ -61,6 +65,10 @@ class SmsMapper extends Mapper { | |||||||
| 
 | 
 | ||||||
| 		$smsList = array(); | 		$smsList = array(); | ||||||
| 		while($row = $result->fetchRow()) { | 		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"]]; | 			$mbox = SmsMapper::$mailboxNames[$row["sms_mailbox"]]; | ||||||
| 			if (!isset($smsList[$mbox])) { | 			if (!isset($smsList[$mbox])) { | ||||||
| 				$smsList[$mbox] = array(); | 				$smsList[$mbox] = array(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user