diff --git a/lib/functions.php b/lib/functions.php index 0fc794bea4..1899b2c047 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -7105,6 +7105,10 @@ function cacti_browser_zone_enabled() { * @return - null */ function cacti_time_zone_set($gmt_offset) { + if (!cacti_browser_zone_enabled()) { + return; + } + $hours = floor($gmt_offset / 60); $remaining = $gmt_offset % 60; diff --git a/lib/rrd.php b/lib/rrd.php index 4048d0c39d..3352024b9c 100644 --- a/lib/rrd.php +++ b/lib/rrd.php @@ -304,16 +304,17 @@ function __rrd_execute($command_line, $log_to_stdout, $output_flag, $rrdtool_pip } cacti_session_close(); + if (is_file(read_config_option('path_rrdtool')) && is_executable(read_config_option('path_rrdtool'))) { $descriptorspec = array( 0 => array('pipe', 'r'), 1 => array('pipe', 'w') ); - if ( $config['is_web'] ) { - if( isset( $_COOKIE['CactiTimeZone'] ) ) { + if ($config['is_web']) { + if (isset($_COOKIE['CactiTimeZone'])) { $gmt_offset = $_COOKIE['CactiTimeZone']; - cacti_time_zone_set( $gmt_offset ); + cacti_time_zone_set($gmt_offset); } }