From e41f176a636af01cc6b3d9a30ff361d953d97ebd Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Mon, 11 Sep 2023 05:27:22 +0000 Subject: [PATCH] Cron: Cast `doing_cron` transient to a float. Cast the `doing_cron` transient value to a float to prevent type errors if the transient is not set (in which case it returns `false`) or another unexpected type. Props fzhantw, ankitmaru. Fixes #58471. Built from https://develop.svn.wordpress.org/trunk@56553 git-svn-id: http://core.svn.wordpress.org/trunk@56065 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/cron.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/cron.php b/wp-includes/cron.php index c3a281a626..4912d5f503 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -863,7 +863,7 @@ function spawn_cron( $gmt_time = 0 ) { * Multiple processes on multiple web servers can run this code concurrently, * this lock attempts to make spawning as atomic as possible. */ - $lock = get_transient( 'doing_cron' ); + $lock = (float) get_transient( 'doing_cron' ); if ( $lock > $gmt_time + 10 * MINUTE_IN_SECONDS ) { $lock = 0; diff --git a/wp-includes/version.php b/wp-includes/version.php index 74209c6c94..887732458b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56552'; +$wp_version = '6.4-alpha-56553'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.