Skip to content

Commit

Permalink
MDL-77749 admin: Fix code error with unset config duration
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanheywood committed Mar 26, 2023
1 parent f3bf17c commit 54505eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4105,13 +4105,13 @@ public function output_html($data, $query='') {
$context = (object) [
'id' => $this->get_id(),
'name' => $this->get_full_name(),
'value' => $data['v'],
'value' => $data['v'] ?? '',
'readonly' => $this->is_readonly(),
'options' => array_map(function($unit) use ($units, $data, $defaultunit) {
return [
'value' => $unit,
'name' => $units[$unit],
'selected' => ($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u']
'selected' => isset($data) && (($data['v'] == 0 && $unit == $defaultunit) || $unit == $data['u'])
];
}, array_keys($units))
];
Expand Down

0 comments on commit 54505eb

Please sign in to comment.