diff --git a/classes/QueryLog.php b/classes/QueryLog.php index a1a4868..a507f40 100644 --- a/classes/QueryLog.php +++ b/classes/QueryLog.php @@ -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 ); ?>
@@ -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;