cast interval to int in case of unexpected option setting

This commit is contained in:
Christian Tramnitz 2021-02-19 11:17:09 +01:00
parent 3f03ea7cda
commit 66d399832e
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ add_filter( 'cron_schedules', 'wolkal3000_cron_interval' );
function wolkal3000_cron_interval( $schedules ) {
$options = get_option('wolkal3000_options');
$current = ( isset ($options['wolkal3000_timer']) ? $options['wolkal3000_timer'] : 60 ); // default 60 minutes
$interval = 60 * $current; // wir speichern Minuten
$interval = 60 * int($current); // wir speichern Minuten
$schedules['wolkal3000_interval'] = array(
'interval' => $interval,
'display' => esc_html__( 'Calendar fetch interval' ),