From 852b375964378e5a229e7747d94f3fdd10eb3083 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 2 Dec 2020 19:53:29 +0100 Subject: [PATCH] LSattribute: fix canBeGenerated() when default_value isn't a string --- src/includes/class/class.LSattribute.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/includes/class/class.LSattribute.php b/src/includes/class/class.LSattribute.php index 7e16406a..9f75b57b 100644 --- a/src/includes/class/class.LSattribute.php +++ b/src/includes/class/class.LSattribute.php @@ -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) ); }