Commit 3372b38e authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6079-selectattribute-take-the-wrong-default-value-when-optional' into '1.4-dev'

Resolve "SelectAttribute take the wrong default value when optional"

See merge request fusiondirectory/fd!754
parents 9e356100 eba95c74
......@@ -50,9 +50,6 @@ class SelectAttribute extends Attribute
*/
function __construct ($label, $description, $ldapName, $required = FALSE, $choices = [], $defaultValue = "", $outputs = NULL, $acl = "")
{
if (!in_array($defaultValue, $choices, TRUE) && isset($choices[0])) {
$defaultValue = $choices[0];
}
parent::__construct($label, $description, $ldapName, $required, $defaultValue, $acl);
$this->setChoices($choices, $outputs);
}
......
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