From 040fc0d49b05d86ad4ae53a56e768e1d0c8d3bc4 Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Sat, 1 Jul 2023 23:25:32 -0400 Subject: [PATCH] clearTempTables: fix condition for user_job check --- CRM/Core/Config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 2aa80a0cfe14..61d8a85672e5 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -388,7 +388,7 @@ public static function clearTempTables($timeInterval = FALSE): void { // TODO: Circa v5.60+, consider a more precise cleanup. Discussion: https://github.com/civicrm/civicrm-core/pull/24538 // A separate process will reap the UserJobs but here the goal is just not to delete them during cache clearing // if they are still referenced. - if (!CRM_Core_DAO::executeQuery("SELECT count(*) FROM civicrm_user_job WHERE metadata LIKE '%" . $tableDAO->tableName . "%'")) { + if (!CRM_Core_DAO::singleValueQuery("SELECT count(*) FROM civicrm_user_job WHERE metadata LIKE '%" . $tableDAO->tableName . "%'")) { // drop leftover temporary tables CRM_Core_DAO::executeQuery("DROP TABLE $table"); }