From: Aaron Schulz Date: Sun, 1 Sep 2019 16:57:51 +0000 (-0700) Subject: Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback X-Git-Tag: 1.34.0-rc.0~406^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=06032ec11e671f3e2c68a0d66b2348c828b9098e;p=lhc%2Fweb%2Fwiklou.git Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback Also make sure the result is a string as is required Change-Id: I90107efd8f253aebc9b83fc2272aedf65ba161ba --- diff --git a/includes/libs/http/MultiHttpClient.php b/includes/libs/http/MultiHttpClient.php index 6b1ef89f46..17352f03b9 100644 --- a/includes/libs/http/MultiHttpClient.php +++ b/includes/libs/http/MultiHttpClient.php @@ -353,9 +353,7 @@ class MultiHttpClient implements LoggerAwareInterface { } curl_setopt( $ch, CURLOPT_READFUNCTION, function ( $ch, $fd, $length ) { - $data = fread( $fd, $length ); - $len = strlen( $data ); - return $data; + return (string)fread( $fd, $length ); } ); } elseif ( $req['method'] === 'POST' ) {