Verified Commit bdf25286 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(supann) Fix error when adding subscription with no entity

issue #6050
parent 8b2e743a
......@@ -408,8 +408,10 @@ class supannAccount extends simplePlugin
$supannEntiteAffectation = $this->supannEntiteAffectation;
foreach ($this->supannEtuInscription as $inscription) {
$values = $this->attributesAccess['supannEtuInscription']->attribute->readValues($inscription);
$supannEtablissement[] = $values[0];
$supannEntiteAffectation[] = $values[6];
$supannEtablissement[] = $values[0];
if (!empty($values[6])) {
$supannEntiteAffectation[] = $values[6];
}
}
$this->supannEtablissement = array_values(array_unique($supannEtablissement));
$this->supannEntiteAffectation = array_values(array_unique($supannEntiteAffectation));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment