From 0b30a4cb34d39c9627b6a3795a18aee21019ce25 Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Fri, 30 Sep 2022 13:49:26 +0200 Subject: [PATCH] PHP 8.2 | Fix for partially supported callback (#44537) `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 --- lib/experimental/html/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/experimental/html/class-wp-html-tag-processor.php b/lib/experimental/html/class-wp-html-tag-processor.php index 2cb2b565a654a..d3bad0be76407 100644 --- a/lib/experimental/html/class-wp-html-tag-processor.php +++ b/lib/experimental/html/class-wp-html-tag-processor.php @@ -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 );