Skip to content

Commit

Permalink
MDL-83367 tasks: Apply trim() to pathtophp setting
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
dravek committed Oct 7, 2024
1 parent 67f5ee3 commit 6fe29f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classes/task/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ protected static function find_php_cli_path() {
global $CFG;

if (!empty($CFG->pathtophp) && is_executable(trim($CFG->pathtophp))) {
return $CFG->pathtophp;
return trim($CFG->pathtophp);
}

return false;
Expand Down

0 comments on commit 6fe29f7

Please sign in to comment.