summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorivan <ivan>2009-08-22 00:26:24 +0000
committerivan <ivan>2009-08-22 00:26:24 +0000
commit7c16d49fb99733c29f25f96b9d22c3c639994d29 (patch)
tree4ba7e15e06856a72076418efe23f4d53deab259b /FS/FS/Record.pm
parentbeb9681db0ee4c0912c82849267a82dd434784b3 (diff)
cleaner??
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index c8216ec..58b2555 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)));