diff options
author | ivan <ivan> | 2008-08-03 00:20:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-08-03 00:20:42 +0000 |
commit | 20a1aade8e12d3b99dd001501e8fc8075133635a (patch) | |
tree | ae285d0706ebfe2e193ef00cbd3b83f3cce3595d /FS | |
parent | 1a3a050131502579e0a8e9c05eee2355a2e7cc3b (diff) |
attempt to eliminate 'Can't call method "exists" on an undefined value at /usr/local/share/perl/5.8.8/FS/Record.pm line 812.' error on upgrade
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Record.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 28c629562..4039facbd 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -806,17 +806,17 @@ sub insert { } my $table = $self->table; - # Encrypt before the database - if ($conf->exists('encryption') && defined(eval '@FS::'. $table . '::encrypted_fields')) { + if ( defined(eval '@FS::'. $table . '::encrypted_fields') + && $conf->exists('encryption') + ) { foreach my $field (eval '@FS::'. $table . '::encrypted_fields') { $self->{'saved'} = $self->getfield($field); $self->setfield($field, $self->encrypt($self->getfield($field))); } } - #false laziness w/delete my @real_fields = grep { defined($self->getfield($_)) && $self->getfield($_) ne "" } |