Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Check if the options are not empty if specified by cacti #48

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cacti/scripts/ss_get_mysql_stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ function ss_get_mysql_stats( $options ) {
$mysql_connection_timeout,
$heartbeat, $heartbeat_table, $heartbeat_server_id, $heartbeat_utc;

$user = isset($options['user']) ? $options['user'] : $mysql_user;
$pass = isset($options['pass']) ? $options['pass'] : $mysql_pass;
$user = isset($options['user']) && ($options['user'] != '') ? $options['user'] : $mysql_user;
$pass = isset($options['pass']) && ($options['pass'] != '') ? $options['pass'] : $mysql_pass;
$host = $options['host'];
$port = isset($options['port']) ? $options['port'] : $mysql_port;
$port = isset($options['port']) && ($options['port'] != '')? $options['port'] : $mysql_port;
$socket = isset($options['socket']) ? $options['socket'] : $mysql_socket;
$flags = isset($options['flags']) ? $options['flags'] : $mysql_flags;
$connection_timeout = isset($options['connection-timeout']) ? $options['connection-timeout'] : $mysql_connection_timeout;
Expand Down