From 0526be26eaf6a3d06ade63e1cc17ee72bfd38401 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Thu, 7 Dec 2017 16:05:53 -0500 Subject: [PATCH] CRM-21531 - replace regex with POSIX-compliant alternative for MariaDB compatibility --- CRM/Core/BAO/CustomQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/BAO/CustomQuery.php b/CRM/Core/BAO/CustomQuery.php index 81e5eb876f..b212c1d55b 100644 --- a/CRM/Core/BAO/CustomQuery.php +++ b/CRM/Core/BAO/CustomQuery.php @@ -360,7 +360,7 @@ SELECT f.id, f.label, f.data_type, if ($isSerialized && !CRM_Utils_System::isNull($value) && !strstr($op, 'NULL') && !strstr($op, 'LIKE')) { $sp = CRM_Core_DAO::VALUE_SEPARATOR; $value = str_replace(",", "$sp|$sp", $value); - $value = str_replace(array('[:comma:]', '(', ')'), array(',', '[[.left-parenthesis.]]', '[[.right-parenthesis.]]'), $value); + $value = str_replace(array('[:comma:]', '(', ')'), array(',', '[(]', '[)]'), $value); $op = (strstr($op, '!') || strstr($op, 'NOT')) ? 'NOT RLIKE' : 'RLIKE'; $value = $sp . $value . $sp; -- 2.25.1