diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ab4e2a8fc..ce975aa5c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -14,6 +14,7 @@ - fix: op=viewPurchaseHistory prices are now formatted correctly - fix: A minor bug in the default viewPurchaseHistory template - 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 - Made a change to version tag commits to deal with unusually long commit diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index cc7d242b9..e8d0a75bb 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -131,7 +131,13 @@ sub _formProperties { $properties->{label} = $self->getLabel unless $properties->{label}; $properties->{fieldType} = $self->get("fieldType"); $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 = {}; tie %{$orderedValues}, 'Tie::IxHash'; foreach my $ov (sort keys %{$values}) {