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

🚑 fix(supann) Avoid PHP crash when LDAP contains invalid data

If supannEtuCursusAnnee contains invalid data, do not crash.

issue #6015
parent c2bd5866
...@@ -55,6 +55,6 @@ class SupannCursusAnneeAttribute extends SupannPrefixedSelectAttribute ...@@ -55,6 +55,6 @@ class SupannCursusAnneeAttribute extends SupannPrefixedSelectAttribute
protected function supannUpdateSelect () protected function supannUpdateSelect ()
{ {
$prefix = $this->attributes[0]->getValue(); $prefix = $this->attributes[0]->getValue();
$this->attributes[1]->setChoices($this->prefixedChoices[$prefix][0], $this->prefixedChoices[$prefix][1]); $this->attributes[1]->setChoices($this->prefixedChoices[$prefix][0] ?? [], $this->prefixedChoices[$prefix][1] ?? []);
} }
} }
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