Coding Standards: Rename the `$gzData` argument to `$gz_data` in `WP_Http_Encoding::compatible_gzinflate()`.

This fixes a `Variable "$gzData" is not in valid snake_case format` WPCS warning.

Follow-up to [11684].

See #53359.
Built from https://develop.svn.wordpress.org/trunk@52150


git-svn-id: http://core.svn.wordpress.org/trunk@51742 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-11-12 23:51:59 +00:00
parent 8b53b4960d
commit ad3ad59c4d
2 changed files with 10 additions and 10 deletions

View File

@ -97,38 +97,38 @@ class WP_Http_Encoding {
* @link https://www.php.net/manual/en/function.gzinflate.php#70875
* @link https://www.php.net/manual/en/function.gzinflate.php#77336
*
* @param string $gzData String to decompress.
* @param string $gz_data String to decompress.
* @return string|false Decompressed string on success, false on failure.
*/
public static function compatible_gzinflate( $gzData ) {
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( $gzData, 0, 3 ) ) {
if ( "\x1f\x8b\x08" === substr( $gz_data, 0, 3 ) ) {
$i = 10;
$flg = ord( substr( $gzData, 3, 1 ) );
$flg = ord( substr( $gz_data, 3, 1 ) );
if ( $flg > 0 ) {
if ( $flg & 4 ) {
list($xlen) = unpack( 'v', substr( $gzData, $i, 2 ) );
list($xlen) = unpack( 'v', substr( $gz_data, $i, 2 ) );
$i = $i + 2 + $xlen;
}
if ( $flg & 8 ) {
$i = strpos( $gzData, "\0", $i ) + 1;
$i = strpos( $gz_data, "\0", $i ) + 1;
}
if ( $flg & 16 ) {
$i = strpos( $gzData, "\0", $i ) + 1;
$i = strpos( $gz_data, "\0", $i ) + 1;
}
if ( $flg & 2 ) {
$i = $i + 2;
}
}
$decompressed = @gzinflate( substr( $gzData, $i, -8 ) );
$decompressed = @gzinflate( substr( $gz_data, $i, -8 ) );
if ( false !== $decompressed ) {
return $decompressed;
}
}
// Compressed data from java.util.zip.Deflater amongst others.
$decompressed = @gzinflate( substr( $gzData, 2 ) );
$decompressed = @gzinflate( substr( $gz_data, 2 ) );
if ( false !== $decompressed ) {
return $decompressed;
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-52149';
$wp_version = '5.9-alpha-52150';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.