LSattribute: fix handling default_value in generateValue()

This commit is contained in:
Benjamin Renard 2020-12-02 20:17:18 +01:00
parent 852b375964
commit f6a6c226f4

View file

@ -470,9 +470,9 @@ class LSattribute extends LSlog_staticLoggerClass {
* @retval boolean true si la valeur à put être générée, false sinon
*/
public function generateValue() {
$value = false;
$value = $this -> getConfig('default_value', false);
$generate_function = $this -> getConfig('generate_function');
$format = $this -> getConfig('generate_value_format', $this -> getConfig('default_value'));
$format = $this -> getConfig('generate_value_format');
if ($generate_function && function_exists($generate_function)) {
$value = call_user_func_array($generate_function, array(&$this -> ldapObject));
}