Skip to content

Commit

Permalink
Merge branch 'master' of github.com:24eme/giilda
Browse files Browse the repository at this point in the history
  • Loading branch information
wincelau committed Apr 24, 2024
2 parents c5d76f1 + cbff7bc commit 62eae35
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function getEtablissementPrincipal() {
foreach ($etablissements as $id => $etbObj) {
$etablissement = $etbObj->etablissement;
$compte = $this->getCompte($etablissement->compte);
if ($compte->compte_type == CompteClient::TYPE_COMPTE_SOCIETE) {
if ($compte && $compte->compte_type == CompteClient::TYPE_COMPTE_SOCIETE) {
return $etablissement;
}
}
Expand All @@ -218,6 +218,9 @@ public function getContactsObj($withSocietesLiees = false) {
public function getAllCompteObj() {
if (!$this->comptes || !count($this->comptes)) {
foreach ($this->contacts as $id => $obj) {
if (!$id) {
continue;
}
$compteToAdd = CompteClient::getInstance()->find($id);
if($compteToAdd){
$this->addToComptes($compteToAdd);
Expand Down

0 comments on commit 62eae35

Please sign in to comment.