Browse Source

cast interval to int in case of unexpected option setting

main
Christian Tramnitz 11 months ago
parent
commit
66d399832e
  1. 2
      wolkal3000.php

2
wolkal3000.php

@ -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' ),

Loading…
Cancel
Save