mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
FIX: Missing return 0 if object not found
This commit is contained in:
@@ -4138,6 +4138,12 @@ class OrderLine extends CommonOrderLine
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
|
||||
if (!$objp) {
|
||||
$this->error = 'OrderLine with id '. $rowid .' not found sql='.$sql;
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->rowid = $objp->rowid;
|
||||
$this->id = $objp->rowid;
|
||||
$this->fk_commande = $objp->fk_commande;
|
||||
|
||||
Reference in New Issue
Block a user