From f6a6c226f477774fb2e167aca8510bbfbd5c3e82 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 2 Dec 2020 20:17:18 +0100 Subject: [PATCH] LSattribute: fix handling default_value in generateValue() --- src/includes/class/class.LSattribute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/includes/class/class.LSattribute.php b/src/includes/class/class.LSattribute.php index 9f75b57b..fe1186b9 100644 --- a/src/includes/class/class.LSattribute.php +++ b/src/includes/class/class.LSattribute.php @@ -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)); }