wp/wp-includes/class-wp-http-encoding.php
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
--- a/wp/wp-includes/class-wp-http-encoding.php	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/class-wp-http-encoding.php	Fri Sep 05 18:40:08 2025 +0200
@@ -14,6 +14,7 @@
  *
  * @since 2.8.0
  */
+#[AllowDynamicProperties]
 class WP_Http_Encoding {
 
 	/**
@@ -103,7 +104,7 @@
 	public static function compatible_gzinflate( $gz_data ) {
 
 		// Compressed data might contain a full header, if so strip it for gzinflate().
-		if ( "\x1f\x8b\x08" === substr( $gz_data, 0, 3 ) ) {
+		if ( str_starts_with( $gz_data, "\x1f\x8b\x08" ) ) {
 			$i   = 10;
 			$flg = ord( substr( $gz_data, 3, 1 ) );
 			if ( $flg > 0 ) {