From cb7cc5a71d5fc05313e43bb364c9839ef7795e1c Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 29 Jan 2024 18:03:33 +0200 Subject: [PATCH] fix sometimes not logged updated contact-data (binary jpegphoto breaks JSON encoding) --- api/src/Accounts/Import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/Accounts/Import.php b/api/src/Accounts/Import.php index d3aa654ea9..e8790d9324 100644 --- a/api/src/Accounts/Import.php +++ b/api/src/Accounts/Import.php @@ -480,8 +480,9 @@ class Import ++$errors; continue; } + $hide_binary = !empty($contact['jpegphoto']) ? ['jpegphoto' => bytes($contact['jpegphoto']).' bytes binary data'] : []; $this->logger("Successful updated contact data of '$account[account_lid]' (#$account_id): ". - json_encode($diff, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE), 'detail'); + json_encode($hide_binary+$diff, JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE), 'detail'); if (!$new) $new = false; } else