From 2bde57c654d583c6688d714635dd936ef651e51d Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 30 Oct 2018 12:09:11 +1300 Subject: [PATCH] Strtolower fix 'name' --- CRM/Contact/BAO/Query.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 083b643c5b75..a15a7a71c97a 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -2212,14 +2212,15 @@ public function restWhere(&$values) { } } elseif ($name === 'name') { - $value = $strtolower(CRM_Core_DAO::escapeString($value)); + $value = CRM_Core_DAO::escapeString($value); if ($wildcard) { $op = 'LIKE'; $value = self::getWildCardedValue($wildcard, $op, $value); } - // LOWER roughly translates to 'hurt my database without deriving any benefit' See CRM-19811. - $wc = self::caseImportant($op) ? "LOWER({$field['where']})" : "{$field['where']}"; - $this->_where[$grouping][] = self::buildClause($wc, $op, "'$value'"); + CRM_Core_Error::deprecatedFunctionWarning('Untested code path'); + // @todo it's likely this code path is obsolete / never called. It is definitely not + // passed through in our test suite. + $this->_where[$grouping][] = self::buildClause($field['where'], $op, "'$value'"); $this->_qill[$grouping][] = "$field[title] $op \"$value\""; } elseif ($name === 'current_employer') {