From 5044079396b9bef09dd498a0e64a4f20046318b8 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 29 Aug 2015 16:00:46 -0700 Subject: [PATCH] eliminate "defined(@array) is deprecated" warnings --- FS/FS/Record.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index ef0d88d80..671d16c92 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1163,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') { @@ -1406,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' -- 2.11.0