dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c9f1a1
)
Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback
author
Aaron Schulz
<aschulz@wikimedia.org>
Sun, 1 Sep 2019 16:57:51 +0000
(09:57 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Tue, 3 Sep 2019 06:12:21 +0000
(06:12 +0000)
Also make sure the result is a string as is required
Change-Id: I90107efd8f253aebc9b83fc2272aedf65ba161ba
includes/libs/http/MultiHttpClient.php
patch
|
blob
|
history
diff --git
a/includes/libs/http/MultiHttpClient.php
b/includes/libs/http/MultiHttpClient.php
index
6b1ef89
..
17352f0
100644
(file)
--- 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' ) {