mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
fix Argument #2 ($old) must be of type ?array, bool given
This commit is contained in:
parent
3631b3e3c9
commit
ffc6a533a4
@ -913,7 +913,7 @@ class Contacts extends Contacts\Storage
|
||||
{
|
||||
if (!isset($contact['owner']) || !isset($contact['private'])) // owner/private not set on update, eg. SyncML
|
||||
{
|
||||
if (($old = $this->read($contact['id']))) // --> try reading the old entry and set it from there
|
||||
if (($old = $this->read($contact['id']) ?: null)) // --> try reading the old entry and set it from there
|
||||
{
|
||||
if(!isset($contact['owner']))
|
||||
{
|
||||
@ -1005,7 +1005,7 @@ class Contacts extends Contacts\Storage
|
||||
// Get old record for tracking changes
|
||||
if (!isset($old) && $isUpdate)
|
||||
{
|
||||
$old = $this->read($contact['id']);
|
||||
$old = $this->read($contact['id']) ?: null;
|
||||
}
|
||||
$to_write = $contact;
|
||||
// (non-admin) user editing his own account, make sure he does not change fields he is not allowed to (eg. via SyncML or xmlrpc)
|
||||
@ -1086,7 +1086,7 @@ class Contacts extends Contacts\Storage
|
||||
if(empty($contact['account_id']) || $contact['account_id'] && $this->account_repository == 'sql')
|
||||
{
|
||||
if (!isset($this->tracking)) $this->tracking = new Contacts\Tracking($this);
|
||||
$this->tracking->track($to_write, $old ?? null, null, $deleted);
|
||||
$this->tracking->track($to_write, $old, null, $deleted);
|
||||
}
|
||||
|
||||
// Notify linked apps about changes in the contact data
|
||||
|
Loading…
Reference in New Issue
Block a user