From 93a817681327ddf9eaa70af71a78938e48130c76 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Feb 2018 15:28:24 +0100 Subject: [PATCH] Fix do not encrypt if empty --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index af940c91234..60d7f4a8c5e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -4667,7 +4667,7 @@ abstract class CommonObject break;*/ case 'password': $algo=''; - if (is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])) + if ($this->array_options[$key] != '' && is_array($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options'])) { // If there is an encryption choice, we use it to crypt data before insert $algo=reset(array_keys($extrafields->attributes[$this->table_element]['param'][$attributeKey]['options']));