X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=fafceacb5ae68c42db42b1a6eee41716d8962d1d;hb=e334c4383752a12527396a498b629537e92f05bd;hp=d6892a96c81ae4e7b7d37671f091a9cb7be7bb34;hpb=600e9b690d7649e8cde7a9a4cd1089fcb432d238;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index d6892a96c..fafceacb5 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1300,8 +1300,7 @@ sub insert { my $table = $self->table; # Encrypt before the database - if ( defined(eval '@FS::'. $table . '::encrypted_fields') - && scalar( eval '@FS::'. $table . '::encrypted_fields') + if ( scalar( eval '@FS::'. $table . '::encrypted_fields') && $conf_encryption ) { foreach my $field (eval '@FS::'. $table . '::encrypted_fields') { @@ -1543,9 +1542,8 @@ sub replace { # Encrypt for replace my $saved = {}; - if ( $conf_encryption - && defined(eval '@FS::'. $new->table . '::encrypted_fields') - && scalar( eval '@FS::'. $new->table . '::encrypted_fields') + if ( scalar( eval '@FS::'. $new->table . '::encrypted_fields') + && $conf_encryption ) { foreach my $field (eval '@FS::'. $new->table . '::encrypted_fields') { next if $field eq 'payinfo'