Fix do not encrypt if empty

This commit is contained in:
Laurent Destailleur 2018-02-23 15:28:24 +01:00
parent 863cab362f
commit 93a8176813

View File

@ -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']));