diff --git a/pandora_console/godmode/reporting/reporting_builder.php b/pandora_console/godmode/reporting/reporting_builder.php index 07499e6162..b9395323b8 100755 --- a/pandora_console/godmode/reporting/reporting_builder.php +++ b/pandora_console/godmode/reporting/reporting_builder.php @@ -2426,7 +2426,7 @@ switch ($action) { $values['top_n_value'] = get_parameter('max_items'); $values['server_name'] = get_parameter('combo_server_sql'); - if ($sql !== '') { + if ($sql !== '' && $sql !== null) { // Replaces possible macros to check the validity of the query $macros_sql = $sql; $macros_sql = str_replace('_start_date_', '0', $macros_sql); @@ -3376,7 +3376,7 @@ switch ($action) { $values['server_name'] = get_parameter('combo_server_sql'); - if ($sql !== '') { + if ($sql !== '' && $sql !== null) { // Replaces possible macros to check the validity of the query $macros_sql = $sql; $macros_sql = str_replace('_start_date_', '0', $macros_sql);