Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
Update Check.php
Browse files Browse the repository at this point in the history
Return null if no ignored plugins setting exists (if setting is `null` then it disappears from the database, thus you get a PHP notice when trying to grab it.)
  • Loading branch information
fredbradley authored Nov 3, 2017
1 parent e54f8a5 commit 195197b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ private function setting($setting) {

$nagios_settings = get_option('nagios-settings', ["nagios_server_ip" => "127.0.0.1", "ignored_plugins"=>NULL]);
$this->ip_address = $nagios_settings['nagios_server_ip'];
if ($setting === "ignored_plugins" && !isset($nagios_settings[$setting])) {
return null;
}
return $nagios_settings[$setting];
}

Expand Down

0 comments on commit 195197b

Please sign in to comment.