projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c80aee
)
Fixed a small bug... if replace is called by SUPER, @_ == 1 if it only contains an...
author
pbowen
<pbowen>
Fri, 18 Mar 2005 16:47:26 +0000
(16:47 +0000)
committer
pbowen
<pbowen>
Fri, 18 Mar 2005 16:47:26 +0000
(16:47 +0000)
FS/FS/Record.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
e24c0eb
..
2a78c4d
100644
(file)
--- 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;