Skip to content

Commit

Permalink
Add isset control to $status to avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
izendegi authored Dec 2, 2024
1 parent a09283b commit 5756eeb
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@
$settings->add($recycleonjoin);

// Only call to the web services and load the setting if the connection is OK
if ($status == 'connectionok') {
$zoomgrps[] = null;
$groupobj = zoom_webservice()->get_groups();
foreach ($groupobj->groups as $group) {
$zoomgrps[$group->id] = $group->name;
if (isset($status)) {
if ($status == 'connectionok') {
$zoomgrps[] = null;
$groupobj = zoom_webservice()->get_groups();
foreach ($groupobj->groups as $group) {
$zoomgrps[$group->id] = $group->name;
}
$protectedgrp = new admin_setting_configselect('zoom/protectedgrp',
get_string('protectedgrp','mod_zoom'),
get_string('protectedgrp_desc','mod_zoom'),0,$zoomgrps);
$settings->add($protectedgrp);
}
$protectedgrp = new admin_setting_configselect('zoom/protectedgrp',
get_string('protectedgrp','mod_zoom'),
get_string('protectedgrp_desc','mod_zoom'),0,$zoomgrps);
$settings->add($protectedgrp);
}

// Global settings.
Expand Down

0 comments on commit 5756eeb

Please sign in to comment.