Commit 49a5301a79 for wordpress.org
commit 49a5301a790a23e81c8a27bdb5b505fc2ccab843
Author: westonruter <westonruter@git.wordpress.org>
Date: Fri Oct 2 01:58:50 2026 +0000
Code Quality: Pass documented values for deprecated arguments.
Four core calls passed a value to a deprecated parameter that did not match its documented type. None of these values are used, so there is no change in behavior.
These call sites were surfaced by narrowing the types of deprecated parameters in the PHPStan stubs. Fixing them first allows the corresponding PHPStan types to be added to core as docblock-only changes. The now-obsolete `add_option()` entry is removed from the PHPStan baseline.
Developed in https://github.com/WordPress/wordpress-develop/pull/13872.
Follow-up to r20080, r23766, r31443, r63024.
Props marian1, swissspidy, westonruter.
See #65817.
Built from https://develop.svn.wordpress.org/trunk@64045
git-svn-id: http://core.svn.wordpress.org/trunk@63204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/includes/image.php b/wp-admin/includes/image.php
index 935c613d56..c3a4a8d769 100644
--- a/wp-admin/includes/image.php
+++ b/wp-admin/includes/image.php
@@ -635,7 +635,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
break;
}
$basename = str_replace( '.', '-', wp_basename( $file ) ) . '-image' . $ext;
- $uploaded = wp_upload_bits( $basename, '', $metadata['image']['data'] );
+ $uploaded = wp_upload_bits( $basename, null, $metadata['image']['data'] );
if ( false === $uploaded['error'] ) {
$image_attachment = array(
'post_mime_type' => $metadata['image']['mime'],
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index 244401cf24..833167da34 100644
--- a/wp-admin/includes/upgrade.php
+++ b/wp-admin/includes/upgrade.php
@@ -1865,7 +1865,7 @@ function upgrade_340() {
if ( 'yes' === $wpdb->get_var( "SELECT autoload FROM $wpdb->options WHERE option_name = 'uninstall_plugins'" ) ) {
$uninstall_plugins = get_option( 'uninstall_plugins' );
delete_option( 'uninstall_plugins' );
- add_option( 'uninstall_plugins', $uninstall_plugins, null, false );
+ add_option( 'uninstall_plugins', $uninstall_plugins, '', false );
}
}
}
diff --git a/wp-admin/update.php b/wp-admin/update.php
index a6c59ec06d..a0ba9cfc06 100644
--- a/wp-admin/update.php
+++ b/wp-admin/update.php
@@ -87,7 +87,7 @@ if ( isset( $_GET['action'] ) ) {
wp_redirect( admin_url( 'update.php?action=activate-plugin&success=true&plugin=' . urlencode( $plugin ) . '&_wpnonce=' . $_GET['_wpnonce'] ) );
die();
}
- iframe_header( __( 'Plugin Reactivation' ), true );
+ iframe_header( __( 'Plugin Reactivation' ) );
if ( isset( $_GET['success'] ) ) {
echo '<p>' . __( 'Plugin reactivated successfully.' ) . '</p>';
}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 7df0912c28..d3d368c238 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-64044';
+$wp_version = '7.2-alpha-64045';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.