mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
HotFix remove empty transports with keys
This commit is contained in:
@ -314,6 +314,9 @@ function ExtTransports($obj) {
|
||||
$tmp = false;
|
||||
// To keep scrutinizer from naging because it doesnt understand eval
|
||||
foreach ($config['alert']['transports'] as $transport => $opts) {
|
||||
if (is_array($opts)) {
|
||||
$opts = array_filter($opts);
|
||||
}
|
||||
if (($opts === true || !empty($opts)) && $opts != false && file_exists($config['install_dir'].'/includes/alerts/transport.'.$transport.'.php')) {
|
||||
echo $transport.' => ';
|
||||
eval('$tmp = function($obj,$opts) { global $config; '.file_get_contents($config['install_dir'].'/includes/alerts/transport.'.$transport.'.php').' return false; };');
|
||||
|
Reference in New Issue
Block a user