FIX avoid php warnings (#35492)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
43e3ebde1a
commit
bca094a6a8
2 changed files with 2 additions and 2 deletions
|
|
@ -795,7 +795,7 @@ if ($object->id > 0 || !empty($object->ref)) {
|
|||
print '</td>'; // Dispatch column
|
||||
print '<td></td>'; // Warehouse column
|
||||
|
||||
$sql = "SELECT ed.rowid";
|
||||
$sql = "SELECT ed.rowid, ed.fk_parent";
|
||||
$sql .= ", cd.fk_product";
|
||||
$sql .= ", ".$db->ifsql('eb.rowid IS NULL', 'ed.qty', 'eb.qty')." as qty";
|
||||
$sql .= ", ".$db->ifsql('eb.rowid IS NULL OR eb.fk_warehouse IS NULL', 'ed.fk_entrepot', 'eb.fk_warehouse')." as fk_warehouse";
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ if (!empty($id) || !empty($ref)) {
|
|||
if ($action == 'add') {
|
||||
$prodattr_all = $prodattr->fetchAll();
|
||||
|
||||
if (!$selected) {
|
||||
if (!$selected && !empty($prodattr_all)) {
|
||||
$selected = $prodattr_all[key($prodattr_all)]->id;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue