Make handling of invalid values for "possible values" for list-based profile
fields slightly more robust. It's still not ideal---the error goes to the WebGUI error log, but the user should be given some indication that the profile field is broken.
This commit is contained in:
parent
0903b1011e
commit
c10b5b4fec
2 changed files with 8 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
- fix: op=viewPurchaseHistory prices are now formatted correctly
|
- fix: op=viewPurchaseHistory prices are now formatted correctly
|
||||||
- fix: A minor bug in the default viewPurchaseHistory template
|
- fix: A minor bug in the default viewPurchaseHistory template
|
||||||
- fix: Thread determination of "current" Post, and shortcuts to non-Thread Posts
|
- fix: Thread determination of "current" Post, and shortcuts to non-Thread Posts
|
||||||
|
- fix: make handling of profile field possible values slightly more robust
|
||||||
|
|
||||||
7.2.1
|
7.2.1
|
||||||
- Made a change to version tag commits to deal with unusually long commit
|
- Made a change to version tag commits to deal with unusually long commit
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,13 @@ sub _formProperties {
|
||||||
$properties->{label} = $self->getLabel unless $properties->{label};
|
$properties->{label} = $self->getLabel unless $properties->{label};
|
||||||
$properties->{fieldType} = $self->get("fieldType");
|
$properties->{fieldType} = $self->get("fieldType");
|
||||||
$properties->{name} = $self->getId;
|
$properties->{name} = $self->getId;
|
||||||
my $values = WebGUI::Operation::Shared::secureEval($self->session,$self->get("possibleValues")) || {};
|
my $values = WebGUI::Operation::Shared::secureEval($self->session,$self->get("possibleValues"));
|
||||||
|
unless (ref $values eq 'HASH') {
|
||||||
|
if ($self->get('possibleValues') =~ /\S/) {
|
||||||
|
$self->session->errorHandler->warn("Could not get a hash out of possible values for profile field ".$self->getId);
|
||||||
|
}
|
||||||
|
$values = {};
|
||||||
|
}
|
||||||
my $orderedValues = {};
|
my $orderedValues = {};
|
||||||
tie %{$orderedValues}, 'Tie::IxHash';
|
tie %{$orderedValues}, 'Tie::IxHash';
|
||||||
foreach my $ov (sort keys %{$values}) {
|
foreach my $ov (sort keys %{$values}) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue