#11851 Fixed weird interval

This commit is contained in:
Jorge Rincon 2023-08-10 13:08:12 +02:00
parent f1cbe8c360
commit 7fc4788353
1 changed files with 7 additions and 4 deletions

View File

@ -1491,10 +1491,13 @@ function config_update_config()
$interval_values_array[] = $new_interval; $interval_values_array[] = $new_interval;
// Get current periods. // Get current periods.
$current_period = get_periods(false, false, true); $current_period = get_periods(false, false, true);
if (!isset($current_period[-1])) {
$new_current_period = array_keys($current_period); $new_current_period = array_keys($current_period);
$new_current_period = implode(',', $new_current_period); $new_current_period = implode(',', $new_current_period);
// Add new periods to current. // Add new periods to current.
array_push($interval_values_array, $new_current_period); array_push($interval_values_array, $new_current_period);
}
$interval_values = implode(',', $interval_values_array); $interval_values = implode(',', $interval_values_array);
} }
} }