summaryrefslogtreecommitdiff
path: root/FS/FS/Record.pm
diff options
context:
space:
mode:
authorpbowen <pbowen>2005-03-18 16:47:26 +0000
committerpbowen <pbowen>2005-03-18 16:47:26 +0000
commit7a3b9d7929435d128bbb474f51c60919edae01a8 (patch)
treea7eb7d5db64a1e4d89f2cae054ea6372c5bbad81 /FS/FS/Record.pm
parent4c80aee9030dc645c0e8e487ce496b9e35b06f91 (diff)
Fixed a small bug... if replace is called by SUPER, @_ == 1 if it only contains an undef. -PB
Diffstat (limited to 'FS/FS/Record.pm')
-rw-r--r--FS/FS/Record.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index e24c0eb..2a78c4d 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -845,11 +845,9 @@ returns the error, otherwise returns false.
sub replace {
my $new = shift;
+ my $old = shift;
- my $old;
- if ( @_ ) {
- $old = shift;
- } else {
+ if (!defined($old)) {
warn "[debug]$me replace called with no arguments; autoloading old record\n"
if $DEBUG;
my $primary_key = $new->dbdef_table->primary_key;