forked from Wavyzz/dolibarr
Merge pull request #22627 from noec764/14_FIX_Invoice_Order_FetchLines
FIX: Missing return 0 if object not found
This commit is contained in:
@@ -4200,6 +4200,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