-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.5, 4.2.2
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-79186-401 -
- Covered by automated tests (PHPUnit)
Hi there,
I experienced an issue while testing the task scheduling feature in Moodle. The error message I received was "Exception - count(): Argument #1 ($value) must be of type Countable|array, string given". I noticed that this error occurs when scheduling any cron task and any of the fields contain a value such as 0/12 or any integer/integer. This error happens on both the latest stable versions of Moodle, version 4.1 and 4.2, when running them on either PHP 8 or PHP 8.1. However, this error does not occur when using PHP 7.4.
To reproduce the error, you can go to the /admin/tool/task/scheduledtasks.php page, select any task to edit, then enter an integer/integer value in any of the fields and save. This should fail on php 8 and php 8.1 but succeed on php 7.4.
Let me know if you have any questions or need further assistance.
- has a non-specific relationship to
-
MDL-69764 Unsupported standard crontab definitions in scheduledtask and Moodle form
- Closed