Skip to content

Commit

Permalink
Update cunits.class.php (#28056)
Browse files Browse the repository at this point in the history
FIX: error SQL when creating a Cunit
  • Loading branch information
Quentin-Seekness authored and eldy committed Feb 7, 2024
1 parent 27002a9 commit 0ad3581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/cunits.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ public function create($user, $notrigger = 0)
$sql .= "code,";
$sql .= "label,";
$sql .= "short_label,";
$sql .= "unit_type";
$sql .= "unit_type,";
$sql .= "scale";
$sql .= ") VALUES (";
$sql .= " ".(!isset($this->id) ? 'NULL' : "'".$this->db->escape($this->id)."'").",";
$sql .= " ".(!isset($this->code) ? 'NULL' : "'".$this->db->escape($this->code)."'").",";
$sql .= " ".(!isset($this->label) ? 'NULL' : "'".$this->db->escape($this->label)."'").",";
$sql .= " ".(!isset($this->short_label) ? 'NULL' : "'".$this->db->escape($this->short_label)."'").",";
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'");
$sql .= " ".(!isset($this->unit_type) ? 'NULL' : "'".$this->db->escape($this->unit_type)."'").",";
$sql .= " ".(!isset($this->scale) ? 'NULL' : "'".$this->db->escape($this->scale)."'");
$sql .= ")";

Expand Down

0 comments on commit 0ad3581

Please sign in to comment.