fixed corner case which causes the user profile to not load in cases where custom forms do not work or are broken. It now skips these and throws a warning
This commit is contained in:
parent
af9ab661a7
commit
5d4c076290
1 changed files with 6 additions and 2 deletions
|
|
@ -299,8 +299,12 @@ sub www_editProfileField {
|
|||
next if $form eq 'DynamicField';
|
||||
my $cmd = join '::', 'WebGUI::Form', $form;
|
||||
eval "use $cmd";
|
||||
my $w = eval {"$cmd"->new($session)};
|
||||
push @profileForms, $form if $w->get("profileEnabled");
|
||||
my $w = eval {"$cmd"->new($session)};
|
||||
unless(defined $w) {
|
||||
$session->errorHandler->warn("Could not load $cmd. Please check the syntax of this module to make sure it works properly");
|
||||
next;
|
||||
}
|
||||
push @profileForms, $form if $w->get("profileEnabled");
|
||||
}
|
||||
|
||||
$fieldType->set("types", \@profileForms);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue