From: pbowen Date: Fri, 18 Mar 2005 16:47:26 +0000 (+0000) Subject: Fixed a small bug... if replace is called by SUPER, @_ == 1 if it only contains an... X-Git-Tag: BEFORE_FINAL_MASONIZE~638 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=7a3b9d7929435d128bbb474f51c60919edae01a8 Fixed a small bug... if replace is called by SUPER, @_ == 1 if it only contains an undef. -PB --- 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;