From 26fd4311a653a9f545f29a706648a47c93acfbb3 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 6 Aug 2024 14:33:16 -0600 Subject: [PATCH] Infolog: Fix blank link / contact rows added to entry history --- infolog/inc/class.infolog_bo.inc.php | 2 +- infolog/inc/class.infolog_ui.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 488588c12a..f004d47878 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -1045,7 +1045,7 @@ class infolog_bo if ($values['info_id'] && $info_id) { $this->write_check_links($to_write); - if(!$values['info_link_id'] || $values['info_link_id'] != $to_write['info_link_id']) + if(!$values['info_link_id'] || $values['info_link_id'] != $to_write['info_link_id'] || $old['info_from'] != $to_write['info_from']) { // Just got a link ID, need to save it unset($to_write['info_etag']); // we must not increment it again diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index aeb4e702f2..6d094cb4c4 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -2328,7 +2328,7 @@ class infolog_ui if(is_array($pm_links)) { - $old_pm_id = $content['pm_id'] && in_array($content['pm_id'], $pm_links) ? $content['pm_id'] : array_shift($pm_links); + $old_pm_id = ($content['pm_id'] && in_array($content['pm_id'], $pm_links) ? $content['pm_id'] : array_shift($pm_links)) ?? ""; } else {