Skip to content

Commit

Permalink
clearTempTables: fix condition for user_job check
Browse files Browse the repository at this point in the history
  • Loading branch information
mlutfy committed Jul 2, 2023
1 parent 8a0a257 commit 040fc0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Core/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 040fc0d

Please sign in to comment.