]> git.mxchange.org Git - friendica.git/commitdiff
Added check for invalid "contact-type"
authorMichael <heluecht@pirati.ca>
Wed, 22 Feb 2017 22:25:35 +0000 (22:25 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 22 Feb 2017 22:25:35 +0000 (22:25 +0000)
include/socgraph.php

index f0ce5875ad834a0d519aab72d6eb7cddbbe60e79..8f6a551d84480054e5886bb6e78528df5615a9cc 100644 (file)
@@ -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);