Onepoll: Prevent errors with invalid mails (#13934)
This commit is contained in:
parent
1c5681c199
commit
44ce5471b3
|
@ -213,7 +213,7 @@ class OnePoll
|
||||||
$mbox = null;
|
$mbox = null;
|
||||||
$user = DBA::selectFirst('user', ['prvkey'], ['uid' => $importer_uid]);
|
$user = DBA::selectFirst('user', ['prvkey'], ['uid' => $importer_uid]);
|
||||||
|
|
||||||
$condition = ["`server` != '' AND `uid` = ?", $importer_uid];
|
$condition = ["`server` != ? AND `user` != ? AND `port` != ? AND `uid` = ?", '', '', 0, $importer_uid];
|
||||||
$mailconf = DBA::selectFirst('mailacct', [], $condition);
|
$mailconf = DBA::selectFirst('mailacct', [], $condition);
|
||||||
if (DBA::isResult($user) && DBA::isResult($mailconf)) {
|
if (DBA::isResult($user) && DBA::isResult($mailconf)) {
|
||||||
$mailbox = Email::constructMailboxName($mailconf);
|
$mailbox = Email::constructMailboxName($mailconf);
|
||||||
|
@ -249,6 +249,10 @@ class OnePoll
|
||||||
$msgs = array_combine($msgs, $metas);
|
$msgs = array_combine($msgs, $metas);
|
||||||
|
|
||||||
foreach ($msgs as $msg_uid => $meta) {
|
foreach ($msgs as $msg_uid => $meta) {
|
||||||
|
if (empty($meta->message_id)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Logger::info('Parsing mail', ['message-uid' => $msg_uid]);
|
Logger::info('Parsing mail', ['message-uid' => $msg_uid]);
|
||||||
|
|
||||||
$datarray = [
|
$datarray = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user