Commit 31cd339221 for wordpress.org

commit 31cd339221c7bf252875a1474ac9f31d8562f7db
Author: SergeyBiryukov <sergeybiryukov@git.wordpress.org>
Date:   Sun Oct 25 18:38:54 2026 +0000

    Code Quality: Correct `argument.unresolvableType` PHPStan errors in `cron.php`.

    In `wp_schedule_single_event()` and `wp_schedule_event()`, `$crons` keys are positive integer Unix timestamps. Using `uksort( $crons, 'strnatcasecmp' )` caused PHPStan level 2+ to report unresolvable callback argument types when passing integer keys to a string comparison function.

    Replacing `uksort()` with `ksort( $crons )` maintains natural numerical ordering by timestamp without type mismatches or unnecessary docblock type overrides.

    Developed in https://github.com/WordPress/wordpress-develop/pull/14030.

    Follow-up to r4289.

    Props huzaifaalmesbah.
    See #65817.
    Built from https://develop.svn.wordpress.org/trunk@64695


    git-svn-id: http://core.svn.wordpress.org/trunk@63845 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/cron.php b/wp-includes/cron.php
index 743b37b326..66ff7beef8 100644
--- a/wp-includes/cron.php
+++ b/wp-includes/cron.php
@@ -205,7 +205,8 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array(), $wp_error
 		'schedule' => $event->schedule,
 		'args'     => $event->args,
 	);
-	uksort( $crons, 'strnatcasecmp' );
+
+	ksort( $crons );

 	return _set_cron_array( $crons, $wp_error );
 }
@@ -329,7 +330,8 @@ function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array(), $wp
 		'args'     => $event->args,
 		'interval' => $event->interval,
 	);
-	uksort( $crons, 'strnatcasecmp' );
+
+	ksort( $crons );

 	return _set_cron_array( $crons, $wp_error );
 }
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 4953e40a04..b02e31341d 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-beta1-64694';
+$wp_version = '7.2-beta1-64695';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.