From f379cb7fdb47ae91755abcae8ddd1737acbd226d Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Thu, 7 Sep 2023 20:48:12 +0000 Subject: [PATCH] Code Modernization: Use wp_trigger_error() in WP_Text_Diff_Renderer_Table magic methods. Replaces `trigger_error()` with `wp_trigger_error()` in each of the `WP_Text_Diff_Renderer_Table` magic methods. [56354] added the dynamic properties deprecation messages to the `__get()`, `__set()`, `__isset()`, `__unset()` magic methods. Since that commit, `wp_trigger_error()` was introduced (see [56530]) as a wrapper for `trigger_error()`. Follow-up to [56354], [56530]. See #58898, #57686. Built from https://develop.svn.wordpress.org/trunk@56544 git-svn-id: http://core.svn.wordpress.org/trunk@56056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-text-diff-renderer-table.php | 12 ++++++++---- wp-includes/version.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-wp-text-diff-renderer-table.php b/wp-includes/class-wp-text-diff-renderer-table.php index b54aa6c368..c0cf35b653 100644 --- a/wp-includes/class-wp-text-diff-renderer-table.php +++ b/wp-includes/class-wp-text-diff-renderer-table.php @@ -521,7 +521,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { return $this->$name; } - trigger_error( + wp_trigger_error( + __METHOD__, "The property `{$name}` is not declared. Getting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED @@ -544,7 +545,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { return; } - trigger_error( + wp_trigger_error( + __METHOD__, "The property `{$name}` is not declared. Setting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED @@ -565,7 +567,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { return isset( $this->$name ); } - trigger_error( + wp_trigger_error( + __METHOD__, "The property `{$name}` is not declared. Checking `isset()` on a dynamic property " . 'is deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED @@ -587,7 +590,8 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer { return; } - trigger_error( + wp_trigger_error( + __METHOD__, "A property `{$name}` is not declared. Unsetting a dynamic property is " . 'deprecated since version 6.4.0! Instead, declare the property on the class.', E_USER_DEPRECATED diff --git a/wp-includes/version.php b/wp-includes/version.php index cad6a79890..a19fb27f3c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56543'; +$wp_version = '6.4-alpha-56544'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.