2
0
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:
Laurent Destailleur
2022-10-24 19:45:41 +02:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -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;