From 9785381a8c7bdf668f49d2606aee8224515da447 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 22 May 2019 17:53:52 +0000 Subject: [PATCH] Date/Time: Use strict comparison in `is_new_day()`, add a unit test. Props pbearne. Fixes #46627. Built from https://develop.svn.wordpress.org/trunk@45375 git-svn-id: http://core.svn.wordpress.org/trunk@45186 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c6542d62d9..ce45499d0c 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -797,7 +797,8 @@ function wp_get_http_headers( $url, $deprecated = false ) { */ function is_new_day() { global $currentday, $previousday; - if ( $currentday != $previousday ) { + + if ( $currentday !== $previousday ) { return 1; } else { return 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index e20c15064c..4a50660723 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45371'; +$wp_version = '5.3-alpha-45375'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.