Update commonobject.class.php

This commit is contained in:
Frédéric FRANCE 2020-10-23 18:18:01 +02:00 committed by GitHub
parent ae4020c9fe
commit c3863aeed8
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);