X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=671d16c92289d2b221fda79c722d22b06b55ff95;hb=3aa784b1324ac14026eb900cf598ad9aec49179a;hp=72745fe1364d71f12a2a161fcfa211a334a0bfd6;hpb=7beec7068e00be5ae1b2599fdf2b494bc19e31d0;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 72745fe13..671d16c92 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -519,6 +519,7 @@ sub qsearch { # Check for encrypted fields and decrypt them. ## only in the local copy, not the cached object + no warnings 'deprecated'; # XXX silence the warning for now if ( $conf_encryption && eval 'defined(@FS::'. $table . '::encrypted_fields)' ) { foreach my $record (@return) { @@ -1162,8 +1163,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') { @@ -1405,9 +1405,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'