Skip to content

Commit

Permalink
Code Modernization: Use correct property in IXR_Message::tag_open().
Browse files Browse the repository at this point in the history
The `IXR_Message` class declares a property `_currentTag`, which is never assigned or used. It does assign to `currentTag` instead, which outside of that one assignment is never used either.

Since there are various other underscore-prefixed properties declared on the class, including one named `_currentTagContents` which is used in several places, it appears that the declared property is correct and the assignment is a typo.

This commit resolves a notice on PHP 8.2:
{{{
Deprecated: Creation of dynamic property IXR_Message::$currentTag is deprecated
}}}

Follow-up to [1346].

Props bjorsch, kraftbj, jrf, mukesh27, SergeyBiryukov.
See #56790.
Built from https://develop.svn.wordpress.org/trunk@55105


git-svn-id: http://core.svn.wordpress.org/trunk@54638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Jan 20, 2023
1 parent c529720 commit 28562c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-includes/IXR/class-IXR-message.php
Expand Up @@ -144,7 +144,7 @@ function parse()
function tag_open($parser, $tag, $attr)
{
$this->_currentTagContents = '';
$this->currentTag = $tag;
$this->_currentTag = $tag;
switch($tag) {
case 'methodCall':
case 'methodResponse':
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-55104';
$wp_version = '6.2-alpha-55105';

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

0 comments on commit 28562c4

Please sign in to comment.