From a99e69c262ea4aa20eb88c06c7a7aec323a9efc7 Mon Sep 17 00:00:00 2001 From: Chamil Wijesooriya Date: Thu, 12 Jul 2018 09:52:43 +0100 Subject: [PATCH] Fixed errors: "Failure in api call for Country get: Unknown field specified for sort. Cannot order by ''id DESC''" --- CRM/Utils/Rule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/Rule.php b/CRM/Utils/Rule.php index 9f3345930c..2bc78c243e 100644 --- a/CRM/Utils/Rule.php +++ b/CRM/Utils/Rule.php @@ -157,7 +157,7 @@ class CRM_Utils_Rule { // at all, so we split and loop over. $parts = explode(',', $str); foreach ($parts as $part) { - if (!preg_match('/^((`[\w-]{1,64}`|[\w-]{1,64})\.)+?(`[\w-]{1,64}`|[\w-]{1,64})( (asc|desc))?$/i', trim($part))) { + if (!preg_match('/^((`[\w-]{1,64}`|[\w-]{1,64})\.)*(`[\w-]{1,64}`|[\w-]{1,64})( (asc|desc))?$/i', trim($part))) { return FALSE; } } -- 2.25.1