Fix Specimen warning in supplier admin when database has no products (#31867)

This commit is contained in:
Mathieu Moulin 2024-11-16 10:45:01 +01:00 committed by GitHub
parent 348981a419
commit cd6ed63768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2938,7 +2938,7 @@ class CommandeFournisseur extends CommonOrder
$sql .= $this->db->order("rowid", "ASC");
$sql .= $this->db->plimit(1);
$resql = $this->db->query($sql);
if ($resql) {
if ($resql && $this->db->num_rows($resql)) {
$obj = $this->db->fetch_object($resql);
$prodid = $obj->rowid;
}