diff options
-rw-r--r-- | FS/FS/Record.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index c8216eca8..58b2555f0 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1207,7 +1207,10 @@ sub replace { # Encrypt for replace my $saved = {}; - if ($conf->exists('encryption') && defined(eval '@FS::'. $new->table . '::encrypted_fields')) { + if ( $conf->exists('encryption') + && defined(eval '@FS::'. $new->table . '::encrypted_fields') + && scalar( eval '@FS::'. $new->table . '::encrypted_fields') + ) { foreach my $field (eval '@FS::'. $new->table . '::encrypted_fields') { $saved->{$field} = $new->getfield($field); $new->setfield($field, $new->encrypt($new->getfield($field))); |