Skip to content

Commit

Permalink
refs #24170, trying to fix regex query.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed Jan 4, 2019
1 parent d7e60fd commit 9699c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Event/BAO/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static function whereClauseSingle(&$values, &$query) {
$feeLabels[] = CRM_Core_DAO::escapeString(trim($value));
}
if (!empty($feeLabels)) {
$feeLabel = implode('|', $feeLabels);
$feeLabel = implode('|', preg_replace('/[()*^$%\[\]]/', '.', $feeLabels));
$query->_where[$grouping][] = "civicrm_participant.fee_level REGEXP '$feeLabel'";
$query->_qill[$grouping][] = ts("Fee level").' '.ts('IN').' '.implode(', ', $feeLabels);
}
Expand Down

0 comments on commit 9699c7a

Please sign in to comment.