Fix fetch test
This commit is contained in:
parent
b67ed87103
commit
15e1d3b456
@ -3015,6 +3015,8 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
$sql.= ' WHERE cd.rowid = '.$rowid;
|
$sql.= ' WHERE cd.rowid = '.$rowid;
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
{
|
||||||
|
if ($this->db->num_rows($result))
|
||||||
{
|
{
|
||||||
$objp = $this->db->fetch_object($result);
|
$objp = $this->db->fetch_object($result);
|
||||||
|
|
||||||
@ -3061,6 +3063,13 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
$this->error='Supplier order line with id='.$rowid.' not found';
|
||||||
|
dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user