diff --git a/include/global_arrays.php b/include/global_arrays.php index 6a951e0fe0..1a1a19d1b7 100644 --- a/include/global_arrays.php +++ b/include/global_arrays.php @@ -459,6 +459,25 @@ 'ROLL' ); +$phperrors = array ( + E_ERROR => 'ERROR', + E_WARNING => 'WARNING', + E_PARSE => 'PARSE', + E_NOTICE => 'NOTICE', + E_CORE_ERROR => 'CORE_ERROR', + E_CORE_WARNING => 'CORE_WARNING', + E_COMPILE_ERROR => 'COMPILE_ERROR', + E_COMPILE_WARNING => 'COMPILE_WARNING', + E_USER_ERROR => 'USER_ERROR', + E_USER_WARNING => 'USER_WARNING', + E_USER_NOTICE => 'USER_NOTICE', + E_STRICT => 'STRICT', + E_RECOVERABLE_ERROR => 'RECOVERABLE_ERROR', + E_DEPRECATED => 'DEPRECATED', + E_USER_DEPRECATED => 'USER_DEPRECATED', + E_ALL => 'ALL' +); + if (cacti_version_compare(get_rrdtool_version(), '1.8.0', '>=')) { $cdef_functions[] = 'ROUND'; } @@ -679,7 +698,7 @@ 2 => 'spine' ); -if (!file_exists(read_config_option('path_spine')) || !is_executable(read_config_option('path_spine'))) { +if (read_config_option('path_spine') != '' && (!file_exists(read_config_option('path_spine')) || !is_executable(read_config_option('path_spine')))) { unset($poller_options[2]); } @@ -1953,25 +1972,6 @@ 3 => __('[Skipped]'), ); -$phperrors = array ( - E_ERROR => 'ERROR', - E_WARNING => 'WARNING', - E_PARSE => 'PARSE', - E_NOTICE => 'NOTICE', - E_CORE_ERROR => 'CORE_ERROR', - E_CORE_WARNING => 'CORE_WARNING', - E_COMPILE_ERROR => 'COMPILE_ERROR', - E_COMPILE_WARNING => 'COMPILE_WARNING', - E_USER_ERROR => 'USER_ERROR', - E_USER_WARNING => 'USER_WARNING', - E_USER_NOTICE => 'USER_NOTICE', - E_STRICT => 'STRICT', - E_RECOVERABLE_ERROR => 'RECOVERABLE_ERROR', - E_DEPRECATED => 'DEPRECATED', - E_USER_DEPRECATED => 'USER_DEPRECATED', - E_ALL => 'ALL' -); - $navigation = array( 'auth_profile.php:' => array( 'title' => __('User Profile (Edit)'), diff --git a/lib/functions.php b/lib/functions.php index b7445e4db2..448629afab 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -6438,7 +6438,7 @@ function get_rrdtool_version() { static $version = ''; if ($version == '') { - $version = str_replace('rrd-', '', str_replace('.x', '.0', read_config_option('rrdtool_version'))); + $version = str_replace('rrd-', '', str_replace('.x', '.0', read_config_option('rrdtool_version') ?: read_default_config_option('rrdtool_version') ?: '1.4.0' )); } return $version;