Commit ac7a27504c for wordpress.org
commit ac7a27504c30e96f309b48ad11ceaaca3572bdd5
Author: westonruter <westonruter@git.wordpress.org>
Date: Mon Sep 7 00:11:57 2026 +0000
Build/Test Tools: Update PHPStan to 2.2.13.
Recent PHPStan releases bring substantial performance improvements. The baselines are regenerated for the new version.
The docblock of `_wp_die_process_input()` is also corrected to admit the integer message that `wp_die()` accepts for the legacy Ajax responses, which the helper passes through untouched. This removes a baseline entry for a guard in `_default_wp_die_handler()` that the incomplete type made look unreachable.
Developed in https://github.com/WordPress/wordpress-develop/pull/13410.
Follow-up to r44666, r53144, r62703, r62798.
Props markusstaab, westonruter.
See #65817.
Fixes #66051.
Built from https://develop.svn.wordpress.org/trunk@63510
git-svn-id: http://core.svn.wordpress.org/trunk@62686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index 1c0b62cf1e..b9d551d59d 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -4848,10 +4848,6 @@ EOF;
$safe_text = (string) preg_replace_callback(
$regex,
static function ( $matches ) {
- if ( ! isset( $matches[0] ) ) {
- return '';
- }
-
if ( isset( $matches['non_cdata'] ) ) {
// escape HTML entities in the non-CDATA Section.
return _wp_specialchars( $matches['non_cdata'], ENT_XML1 );
diff --git a/wp-includes/functions.php b/wp-includes/functions.php
index 294580be4d..e9256bf0a1 100644
--- a/wp-includes/functions.php
+++ b/wp-includes/functions.php
@@ -4360,15 +4360,15 @@ function _scalar_wp_die_handler( $message = '', $title = '', $args = array() ) {
* @since 5.1.0
* @access private
*
- * @param string|WP_Error $message Error message or WP_Error object.
- * @param string $title Optional. Error title. Default empty string.
- * @param string|array $args Optional. Arguments to control behavior. Default empty array.
+ * @param string|WP_Error|int $message Error message, WP_Error object, or integer response.
+ * @param string $title Optional. Error title. Default empty string.
+ * @param string|array $args Optional. Arguments to control behavior. Default empty array.
* @return array {
* Processed arguments.
*
- * @type string $0 Error message.
- * @type string $1 Error title.
- * @type array $2 Arguments to control behavior.
+ * @type string|int $0 Error message, or integer response.
+ * @type string $1 Error title.
+ * @type array $2 Arguments to control behavior.
* }
*/
function _wp_die_process_input( $message, $title = '', $args = array() ) {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 454d8a6488..a4b332e594 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63509';
+$wp_version = '7.2-alpha-63510';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.