Skip to content

Commit

Permalink
Check if timestamp is numeric to prevent warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NickGreen committed Oct 17, 2024
1 parent 74dd54c commit 4470387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class-plugin-autoupdate-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function filter_enforce_delay( $update, $item ): bool {
if ( false === $has_delay_passed ) {
$option_key = 'plugin_update_delays';
$delays = get_option( $option_key, array() );
if ( isset( $delays[ $plugin_file ][ $plugin_new_version ] ) ) {
if ( isset( $delays[ $plugin_file ][ $plugin_new_version ] ) && is_numeric( $delays[ $plugin_file ][ $plugin_new_version ] ) ) {
$delay_date = $delays[ $plugin_file ][ $plugin_new_version ];

// Get the site's date and time format settings.
Expand Down

0 comments on commit 4470387

Please sign in to comment.