From ee9fd9724137ad919e7527e1b952795077c31620 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 31 Aug 2022 16:17:13 +0000 Subject: [PATCH] Tests: Use correct `post_author` value in `WP_Test_REST_Attachments_Controller`. The `$editor_id` property is declared as static, so can only be approached as static, even when used within the same class in which the property is declared. Using non-static access will result in `null`. See: https://3v4l.org/93HQL This PHP notice was hidden so far, due to the existence of magic methods in the `WP_UnitTestCase_Base` class. All the same, the magic methods as they were, would also return `null` for this property. All in all, the attachment being created for this test would never get the correct `post_author`. Fixed by using static access to approach the static property. This bug was discovered while fixing (removing) the magic methods in the `WP_UnitTestCase_Base` class in an effort to improve compatibility with PHP 8.2. Follow-up to [38832]. Props jrf, costdev, johnbillion. See #55652. Built from https://develop.svn.wordpress.org/trunk@54041 git-svn-id: http://core.svn.wordpress.org/trunk@53600 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 015473150a..38faba3eb1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54040'; +$wp_version = '6.1-alpha-54041'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.