Merge pull request #15120 from frederic34/patch-6

Update commonobject.class.php
This commit is contained in:
Laurent Destailleur 2020-10-25 14:50:56 +01:00 committed by GitHub
commit e7743948cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5693,7 +5693,7 @@ abstract class CommonObject
$linealreadyfound = 0;
// Check if there is already a line for this object (in most cases, it is, but sometimes it is not, for example when extra field has been created after), so we must keep this overload)
$sql .= "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id;
$sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX.$this->table_element."_extrafields WHERE fk_object = ".$this->id;
$resql = $this->db->query($sql);
if ($resql) {
$tmpobj = $this->db->fetch_object($resql);