From ca6ea3a4363a9bebbbfe5d64f3341d7258d26def Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 4 Nov 2019 11:48:40 -0700 Subject: [PATCH] * Addressbook: Fix files and entries linked to a new contact were not saved --- addressbook/inc/class.addressbook_ui.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index c1f9850cf8..d93d6f7afe 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -2304,7 +2304,7 @@ class addressbook_ui extends addressbook_bo } else { - if (is_numeric($contact_id)) $content['link_to']['to_id'] = $contact_id; + if ($contact_id && is_numeric($contact_id)) $content['link_to']['to_id'] = $contact_id; } // automatic link new entries to entries specified in the url if (!$contact_id && isset($_REQUEST['link_app']) && isset($_REQUEST['link_id']) && !is_array($content['link_to']['to_id'])) @@ -2943,7 +2943,7 @@ class addressbook_ui extends addressbook_bo { return array($contact_id); } - + $query['num_rows'] = -1; $query['start'] = 0; if(!array_key_exists('filter', $query))