From c84565633ee4cdea437ee220ce018baf24d325e3 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 22 Feb 2017 22:25:35 +0000 Subject: [PATCH] Added check for invalid "contact-type" --- include/socgraph.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/socgraph.php b/include/socgraph.php index f0ce5875ad..8f6a551d84 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -1592,6 +1592,11 @@ function get_gcontact_id($contact) { */ function update_gcontact($contact) { + // Check for invalid "contact-type" value + if (isset($contact['contact-type']) AND (intval($contact['contact-type']) < 0)) { + $contact['contact-type'] = 0; + } + /// @todo update contact table as well $gcontact_id = get_gcontact_id($contact); -- 2.39.5