Commit 22531f697e for wordpress.org

commit 22531f697e524dc0ae449e8e522cd77ed0586ea0
Author: westonruter <westonruter@git.wordpress.org>
Date:   Mon Sep 21 22:04:50 2026 +0000

    Code Quality: Stop passing a `WP_Error` to the skin's `before()`.

    The bulk compatibility checks in `Plugin_Upgrader::bulk_upgrade()` and `Theme_Upgrader::bulk_upgrade()` handed the `WP_Error` they had just built to `$this->skin->before()`, which takes no parameter. The `$this->skin->error( $result )` call on the next line is what reports the failure, and the `$this->skin->after()` call below it already passes nothing.

    The argument was inert only because of which skin those paths reach. Both `Bulk_Plugin_Upgrader_Skin::before()` and `Bulk_Theme_Upgrader_Skin::before()` ignore the `$title` they are given and call the parent with the plugin or theme name instead, so the object was discarded before anything could read it. A skin without that override, such as a plain `Bulk_Upgrader_Skin`, instead places it in the `%1$s` of the `Updating Plugin %1$s (%2$d/%3$d)` header, where PHP 8 throws `Object of class WP_Error could not be converted to string` and takes down the update screen. Removing the argument closes a latent fatal rather than only tidying an unused value.

    Nothing reads the parameter today: every `before()` implementation in core either declares none at all or documents a `string $title`, and a survey of the plugin and theme directories turned up no consumer: only copies of this same loop passing the same dead argument.

    This empties `tests/phpstan/baselines/arguments.count.neon`, so as that file's header directs it is deleted along with its `includes` entry in `phpstan.neon.dist`.

    Developed in https://github.com/WordPress/wordpress-develop/pull/13571.
    Follow-up to r56525, r57252, r63020.

    Props soean.
    See #65817.

    Built from https://develop.svn.wordpress.org/trunk@63788


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

diff --git a/wp-admin/includes/class-plugin-upgrader.php b/wp-admin/includes/class-plugin-upgrader.php
index 5361c63821..53e8f4af6b 100644
--- a/wp-admin/includes/class-plugin-upgrader.php
+++ b/wp-admin/includes/class-plugin-upgrader.php
@@ -356,7 +356,7 @@ class Plugin_Upgrader extends WP_Upgrader {
 					)
 				);

-				$this->skin->before( $result );
+				$this->skin->before();
 				$this->skin->error( $result );
 				$this->skin->after();
 			} elseif ( isset( $upgrade_data->requires_php ) && ! is_php_version_compatible( $upgrade_data->requires_php ) ) {
@@ -370,7 +370,7 @@ class Plugin_Upgrader extends WP_Upgrader {
 					)
 				);

-				$this->skin->before( $result );
+				$this->skin->before();
 				$this->skin->error( $result );
 				$this->skin->after();
 			} else {
diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php
index 9a963d433c..c665ca0631 100644
--- a/wp-admin/includes/class-theme-upgrader.php
+++ b/wp-admin/includes/class-theme-upgrader.php
@@ -454,7 +454,7 @@ class Theme_Upgrader extends WP_Upgrader {
 					)
 				);

-				$this->skin->before( $result );
+				$this->skin->before();
 				$this->skin->error( $result );
 				$this->skin->after();
 			} elseif ( isset( $upgrade_data['requires_php'] ) && ! is_php_version_compatible( $upgrade_data['requires_php'] ) ) {
@@ -468,7 +468,7 @@ class Theme_Upgrader extends WP_Upgrader {
 					)
 				);

-				$this->skin->before( $result );
+				$this->skin->before();
 				$this->skin->error( $result );
 				$this->skin->after();
 			} else {
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 2ba4008f9d..828ec5c0b5 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-63787';
+$wp_version = '7.2-alpha-63788';

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