Check array is array
This commit is contained in:
parent
8ad81a092a
commit
68055e579f
@ -792,7 +792,7 @@ if ($resql)
|
|||||||
$generic_commande->id=$obj->rowid;
|
$generic_commande->id=$obj->rowid;
|
||||||
$generic_commande->ref=$obj->ref;
|
$generic_commande->ref=$obj->ref;
|
||||||
$generic_commande->statut = $obj->fk_statut;
|
$generic_commande->statut = $obj->fk_statut;
|
||||||
$generic_commande->date_commande = $db->jdate($obj->date_commande);
|
$generic_commande->date = $db->jdate($obj->date_commande);
|
||||||
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
|
$generic_commande->date_livraison = $db->jdate($obj->date_delivery);
|
||||||
$generic_commande->ref_client = $obj->ref_client;
|
$generic_commande->ref_client = $obj->ref_client;
|
||||||
$generic_commande->total_ht = $obj->total_ht;
|
$generic_commande->total_ht = $obj->total_ht;
|
||||||
|
|||||||
@ -868,7 +868,7 @@ abstract class CommonObject
|
|||||||
// Socpeople must have already been added by some trigger, then we have to check it to avoid DB_ERROR_RECORD_ALREADY_EXISTS error
|
// Socpeople must have already been added by some trigger, then we have to check it to avoid DB_ERROR_RECORD_ALREADY_EXISTS error
|
||||||
$TListeContacts=$this->liste_contact(-1, $source);
|
$TListeContacts=$this->liste_contact(-1, $source);
|
||||||
$already_added=false;
|
$already_added=false;
|
||||||
if(!empty($TListeContacts)) {
|
if (is_array($TListeContacts) && ! empty($TListeContacts)) {
|
||||||
foreach($TListeContacts as $array_contact) {
|
foreach($TListeContacts as $array_contact) {
|
||||||
if ($array_contact['status'] == 4 && $array_contact['id'] == $fk_socpeople && $array_contact['fk_c_type_contact'] == $id_type_contact) {
|
if ($array_contact['status'] == 4 && $array_contact['id'] == $fk_socpeople && $array_contact['fk_c_type_contact'] == $id_type_contact) {
|
||||||
$already_added=true;
|
$already_added=true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user