MDL-70926 core: getuserdate() shoud show debugging if null was passed

passing null to getdate() has different results in PHP7 and PHP8
This commit is contained in:
Marina Glancy
2021-05-06 20:41:16 +02:00
committed by Eloy Lafuente (stronk7)
parent 383848344c
commit c7e3291ac8
6 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ class MoodleQuickForm_defaultcustom extends MoodleQuickForm_group {
*/
protected function timestamp_to_date_array($value) {
$calendartype = \core_calendar\type_factory::get_calendar_instance();
$currentdate = $calendartype->timestamp_to_date_array($value, $this->_options['timezone']);
$currentdate = $calendartype->timestamp_to_date_array((int)$value, $this->_options['timezone']);
return array(
'minute' => $currentdate['minutes'],
'hour' => $currentdate['hours'],