From 464b608632220b03bbe6678abbb20a10400ceeec Mon Sep 17 00:00:00 2001 From: eileen <emcnaughton@wikimedia.org> Date: Sat, 13 Feb 2021 11:05:44 +1300 Subject: [PATCH] Fix Redis deprecated warning It's not obvious why we would pass trapException here. I believe the issue is that some custom searches result in 'acceptable' bad sql here but https://github.com/civicrm/civicrm-core/commit/6dc40f3250ede0f38ce2aed7c3fabd3f1f667c1b already fixed to catch any exception so we don't need to convert. There is one other place that calls fillWithSql but there is no evidence it is subject to the random issue on custom searches / needs any attention at the moment --- CRM/Core/PrevNextCache/Redis.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CRM/Core/PrevNextCache/Redis.php b/CRM/Core/PrevNextCache/Redis.php index 5811de0581..8c574ae51c 100644 --- a/CRM/Core/PrevNextCache/Redis.php +++ b/CRM/Core/PrevNextCache/Redis.php @@ -46,10 +46,7 @@ class CRM_Core_PrevNextCache_Redis implements CRM_Core_PrevNextCache_Interface { } public function fillWithSql($cacheKey, $sql, $sqlParams = []) { - $dao = CRM_Core_DAO::executeQuery($sql, $sqlParams, FALSE, NULL, FALSE, TRUE, TRUE); - if (is_a($dao, 'DB_Error')) { - throw new CRM_Core_Exception($dao->message); - } + $dao = CRM_Core_DAO::executeQuery($sql, $sqlParams, FALSE); list($allKey, $dataKey, , $maxScore) = $this->initCacheKey($cacheKey); -- 2.25.1