Merge branch 'MDL-78544-402' of https://github.com/snake/moodle into MOODLE_402_STABLE

This commit is contained in:
Andrew Nicols
2023-06-24 22:26:41 +08:00
+1 -1
View File
@@ -157,7 +157,7 @@ class MoodleQuickForm_duration extends MoodleQuickForm_group {
* @return array associative array ($number => $unit)
*/
public function seconds_to_unit($seconds) {
if ($seconds == 0) {
if (empty($seconds)) {
return [0, $this->_options['defaultunit']];
}
foreach ($this->get_units_used() as $unit => $notused) {