Fix duplicate contacts on autosave for addresses with uppercase letters

IncFrec() lowercases the existing addresses but compares them against the
new address in its original case, so an address with uppercase letters is
never found and a new contact is created on every send.

Fixes #1767
This commit is contained in:
Andreas Pries 2026-09-29 22:48:07 +02:00
parent c154d23cfe
commit 6ef8a9a391

View file

@ -997,7 +997,7 @@ class PdoAddressBook
$sEmail = \trim($oItem->GetEmail(true));
if (\strlen($sEmail)) {
$aEmailsToUpdate[] = $sEmail;
return !\in_array($sEmail, $aExists);
return !\in_array(\mb_strtolower($sEmail), $aExists);
}
}
return false;