From 7a3b9d7929435d128bbb474f51c60919edae01a8 Mon Sep 17 00:00:00 2001 From: pbowen Date: Fri, 18 Mar 2005 16:47:26 +0000 Subject: [PATCH] Fixed a small bug... if replace is called by SUPER, @_ == 1 if it only contains an undef. -PB --- FS/FS/Record.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index e24c0eb9a..2a78c4dc4 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; -- 2.11.0