Skip to content

Commit

Permalink
PHP 8.2 | Fix for partially supported callback (#44537)
Browse files Browse the repository at this point in the history
`array( 'self', 'method_name' )`-like callbacks are only partially supported by PHP. With this mind, they will be deprecated in PHP 8.2, with support being completely removed in PHP 9.0.

Fixed by changing it to a fully supported syntax.

Refs:
* https://wiki.php.net/rfc/deprecate_partially_supported_callables

Co-authored-by: jrfnl <[email protected]>
  • Loading branch information
jrfnl and jrfnl authored Sep 30, 2022
1 parent bb72b32 commit 0b30a4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/experimental/html/class-wp-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ private function apply_attributes_updates() {
* out of order, which could otherwise lead to mangled output,
* partially-duplicate attributes, and overwritten attributes.
*/
usort( $this->attribute_updates, array( 'self', 'sort_start_ascending' ) );
usort( $this->attribute_updates, array( self::class, 'sort_start_ascending' ) );

foreach ( $this->attribute_updates as $diff ) {
$this->updated_html .= substr( $this->html, $this->updated_bytes, $diff->start - $this->updated_bytes );
Expand Down

0 comments on commit 0b30a4c

Please sign in to comment.