LSattribute: fix canBeGenerated() when default_value isn't a string

This commit is contained in:
Benjamin Renard 2020-12-02 19:53:29 +01:00
parent 1da0693138
commit 852b375964

View file

@ -454,14 +454,11 @@ class LSattribute extends LSlog_staticLoggerClass {
*/
public function canBeGenerated() {
$format = $this -> getConfig('generate_value_format', $this -> getConfig('default_value'));
self :: log_debug($this."->canBeGenerated(): format='$format'");
return (
(function_exists($this -> getConfig('generate_function')))
||
(
(is_string($format))
&&
(strlen($format) > 0)
)
!is_empty($format)
);
}