diff --git a/htdocs/modules/profile/class/field.php b/htdocs/modules/profile/class/field.php index fcd581623..b00fb41b0 100644 --- a/htdocs/modules/profile/class/field.php +++ b/htdocs/modules/profile/class/field.php @@ -589,7 +589,8 @@ public function insert(XoopsObject $obj, $force = false) } $sql = "ALTER TABLE `" . $profile_handler->table . "` " . $changetype . " `" . $obj->cleanVars['field_name'] . "` " . $type . $maxlengthstring . ' NULL'; - if (!$this->db->query($sql)) { + $result = $force ? $this->db->queryF($sql) : $this->db->query($sql); + if (!$result) { return false; } }