Skip to content

Commit

Permalink
Fix keep enabled logic
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Sep 14, 2023
1 parent dcf11b6 commit 3d675a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/QueryLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function screen_options() {
$action = '';
}

$is_time_limit = ! empty( $enabled ) && ! in_array( $enabled, [ '0', 0, '-1' ], true );
$is_time_limit = ! empty( $enabled ) && ! in_array( $enabled, [ '0', 0, '-1', -1 ], true );
?>

<div class="wrap">
Expand Down Expand Up @@ -628,7 +628,7 @@ public function sanitize_enable_logging( $value ) {
if ( 'time_limit' === $value ) {
$value = wp_date( 'U', strtotime( '+5 minutes' ) );
} else {
$value = (int) ! empty( $value );
$value = ! empty( $value ) ? -1 : 0;
}

return $value;
Expand Down

0 comments on commit 3d675a3

Please sign in to comment.