From 2698647bcde165a2f78262f340115abd185fe979 Mon Sep 17 00:00:00 2001 From: David Carrillo Date: Fri, 4 Oct 2024 15:03:30 +0200 Subject: [PATCH] MDL-83367 tasks: Apply trim() to pathtophp setting - It fixes the problem that when "pathtophp" setting is stored with whitespaces, the "Run now" button will still show up in the tasks list, but the task will never run --- lib/classes/task/manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/task/manager.php b/lib/classes/task/manager.php index 951a18e8bbb..7411235394f 100644 --- a/lib/classes/task/manager.php +++ b/lib/classes/task/manager.php @@ -1492,7 +1492,7 @@ class manager { global $CFG; if (!empty($CFG->pathtophp) && is_executable(trim($CFG->pathtophp))) { - return $CFG->pathtophp; + return trim($CFG->pathtophp); } return false;