mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
FIX avoid php warnings (#35492)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user