Skip to content

Commit

Permalink
Merge pull request #14895 from mattwire/optiongroup_checkcrash
Browse files Browse the repository at this point in the history
Don't let optiongroup check crash
  • Loading branch information
seamuslee001 authored Jul 27, 2019
2 parents 0d3ea1d + 8f352cb commit 64b5ec1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CRM/Utils/Check/Component/OptionGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ public function checkOptionGroupValues() {
$values = CRM_Core_BAO_OptionValue::getOptionValuesArray($optionGroup['id']);
if (count($values) > 0) {
foreach ($values as $value) {
$validate = CRM_Utils_Type::validate($value['value'], $optionGroup['data_type'], FALSE);
if (is_null($validate)) {
try {
CRM_Utils_Type::validate($value['value'], $optionGroup['data_type'], FALSE, '', TRUE);
}
catch (Exception $e) {
$problemValues[] = [
'group_name' => $optionGroup['title'],
'value_name' => $value['label'],
Expand Down

0 comments on commit 64b5ec1

Please sign in to comment.