diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..b79a567 --- /dev/null +++ b/composer.json @@ -0,0 +1,18 @@ +{ + "name": "cacti/plugin_intropage", + "description": "plugin_intropage plugin for Cacti", + "license": "GPL-2.0-or-later", + "require-dev": { + "pestphp/pest": "^1.23" + }, + "config": { + "allow-plugins": { + "pestphp/pest-plugin": true + } + }, + "autoload-dev": { + "files": [ + "tests/bootstrap.php" + ] + } +} diff --git a/include/functions.php b/include/functions.php index 3025d83..4692b8c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -811,7 +811,7 @@ function intropage_reload_panel() { } $name = isset($data['name']) ? html_escape($data['name']) : __esc('Not Found', 'intropage'); - $height = isset($panel['height']) ? $panel['height'] : 'normal'; + $height = $panel['height'] ?? 'normal'; $alarm = isset($data['alarm']) && $data['alarm'] !== '' ? $data['alarm'] : 'grey'; print '