2
0
forked from Wavyzz/dolibarr

Fix scrutinizer

This commit is contained in:
Laurent Destailleur
2022-05-21 15:22:08 +02:00
parent b14c04a8f0
commit 2c2544d471
3 changed files with 30 additions and 8 deletions

View File

@@ -133,7 +133,10 @@ class Orders extends DolibarrApi
}
// Add external contacts ids
$this->commande->contacts_ids = $this->commande->liste_contact(-1, 'external', $contact_list);
$tmparray = $this->commande->liste_contact(-1, 'external', $contact_list);
if (is_array($tmparray)) {
$this->commande->contacts_ids = $tmparray;
}
$this->commande->fetchObjectLinked();
// Add online_payment_url, cf #20477
@@ -234,7 +237,10 @@ class Orders extends DolibarrApi
$commande_static = new Commande($this->db);
if ($commande_static->fetch($obj->rowid)) {
// Add external contacts ids
$commande_static->contacts_ids = $commande_static->liste_contact(-1, 'external', 1);
$tmparray = $commande_static->liste_contact(-1, 'external', 1);
if (is_array($tmparray)) {
$commande_static->contacts_ids = $tmparray;
}
// Add online_payment_url, cf #20477
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
$commande_static->online_payment_url = getOnlinePaymentUrl(0, 'order', $commande_static->ref);