summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-12-29 18:23:02 -0800
committerIvan Kohler <ivan@freeside.biz>2013-12-29 18:23:02 -0800
commit5221eadfdb1a8faa0b46e8a8577876fb8d67fb37 (patch)
treee0f5c77fac02ac037f7f589a0044c37f2314bbaf
parentf8b3592d2808827dcef2b5d4821d0757bab5c518 (diff)
still report errant AUTOLOAD triggering in the new world of FKs, RT#13971
-rw-r--r--FS/FS/Record.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 835b73d8f..39a392013 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -979,6 +979,9 @@ sub AUTOLOAD {
my($field)=$AUTOLOAD;
$field =~ s/.*://;
+ confess "errant AUTOLOAD $field for $self (arg $value)"
+ unless blessed($self) && $self->can('setfield');
+
#$fk_method_cache{$self->table} ||= fk_methods($self->table);
if ( exists($fk_method_cache{$self->table}->{$field}) ) {
@@ -1006,12 +1009,8 @@ sub AUTOLOAD {
}
if ( defined($value) ) {
- confess "errant AUTOLOAD $field for $self (arg $value)"
- unless blessed($self) && $self->can('setfield');
$self->setfield($field,$value);
} else {
- confess "errant AUTOLOAD $field for $self (no args)"
- unless blessed($self) && $self->can('getfield');
$self->getfield($field);
}
}