From 6012fa0af6a98ecef72f537a87bb3ddd6f19afa6 Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Wed, 10 Apr 2024 17:15:55 +0700 Subject: [PATCH] MDL-81494 adhoc_task: Added missing space for query condition --- lib/classes/cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/cron.php b/lib/classes/cron.php index 6f2d6fb4cd6..c8009707f65 100644 --- a/lib/classes/cron.php +++ b/lib/classes/cron.php @@ -365,7 +365,7 @@ class cron { } // Only rerun the failed tasks that allow to be re-tried or have the remaining attempts available. - $where .= 'AND (attemptsavailable > 0 OR attemptsavailable IS NULL)'; + $where .= ' AND (attemptsavailable > 0 OR attemptsavailable IS NULL)'; $tasks = $DB->get_records_sql("SELECT * from {task_adhoc} WHERE $where", $params); foreach ($tasks as $t) { self::run_adhoc_task($t->id);