summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI/Signup.pm
diff options
context:
space:
mode:
authorivan <ivan>2010-10-25 14:53:46 +0000
committerivan <ivan>2010-10-25 14:53:46 +0000
commit716be4fdacc0995d54a0df8c77268606f23fa768 (patch)
tree89a536b491ec865e2f087855f3849618a7eeffff /FS/FS/ClientAPI/Signup.pm
parent140b381af1008dad929b4d3b87aa1e54747d534f (diff)
should fix "cant call method "setdefault" on an undefined value" errors, RT#10360
Diffstat (limited to 'FS/FS/ClientAPI/Signup.pm')
-rw-r--r--FS/FS/ClientAPI/Signup.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index ec45e79..7bbdaff 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -608,8 +608,6 @@ sub new_customer {
} else {
die "unknown signup service $svc_x";
}
- my $y = $svc[0]->setdefault; # arguably should be in new method
- return { 'error' => $y } if $y && !ref($y);
if ($packet->{'mac_addr'} && $conf->exists('signup_server-mac_addr_svcparts'))
{
@@ -628,15 +626,16 @@ sub new_customer {
'_password' => '', #blank as requested (set passwordmin to 0)
};
- my $y = $svc->setdefault; # arguably should be in new method
- return { 'error' => $y } if $y && !ref($y);
-
push @svc, $svc;
}
- #$error = $svc->check;
- #return { 'error' => $error } if $error;
+ foreach my $svc ( @svc ) {
+ my $y = $svc->setdefault; # arguably should be in new method
+ return { 'error' => $y } if $y && !ref($y);
+ #$error = $svc->check;
+ #return { 'error' => $error } if $error;
+ }
#setup a job dependancy to delay provisioning
my $placeholder = new FS::queue ( {