3.10.1, 3.11, 4.0
The original description of this issue has been modified. Initially it was reported as an error in the dateselector field which is actually part of
This issue has been re-purposed for another problem discovered in the process:
returns different results in PHP8 and PHP7. Since Moodle supports both php7 and php8 we need to make sure that usergetdate() is never called with the null argument because the behavior will be inconsistent.
To see the differences, take a look to https://3v4l.org/PeZhr
- Not passing anything is consistent, returns now (2021).
- Passing zero (0) is consistent, returns 0 (1970)
- Passing null is inconsistent, with php7 it returns 0, but with php8, it returns now.
- We must prevent any (inconsistent) call passing null to happen (that's what the 1st commit does, detect).
- We must change any call previously passing null, to pass 0, to keep results the same. 2nd commit will do.