From: Michael Date: Wed, 22 Feb 2017 22:25:35 +0000 (+0000) Subject: Added check for invalid "contact-type" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c84565633ee4cdea437ee220ce018baf24d325e3;p=friendica.git Added check for invalid "contact-type" --- 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);