Solve PHP Notice: Undefined index: ENCODING

This commit is contained in:
the-djmaze 2024-03-14 04:34:15 +01:00
parent d0be08ddd3
commit 56950b4b70

View file

@ -47,7 +47,7 @@ class Contact implements \JsonSerializable
*/
public function setVCard(VCard $oVCard) : void
{
if ($oVCard->PHOTO && $oVCard->PHOTO->parameters['ENCODING']) {
if ($oVCard->PHOTO && !empty($oVCard->PHOTO->parameters['ENCODING'])) {
$oVCard->VERSION = '3.0';
}
if (VCard::VCARD40 != $oVCard->getDocumentType()) {