Remove the explicit passing of a Guzzle sink
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 22 Oct 2020 07:59:57 +0000 (09:59 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 22 Oct 2020 07:59:57 +0000 (09:59 +0200)
wcfsetup/install/files/lib/system/style/FontManager.class.php
wcfsetup/install/files/lib/util/HTTPRequest.class.php

index d9bbd95b793bde2c4cef7acf2f6fa1648a0fd408..35063849e37de3046e199235bb5466b758c58ac1 100644 (file)
@@ -86,10 +86,7 @@ class FontManager extends SingletonFactory {
                                        throw new \InvalidArgumentException("Invalid filename '".$filename."' given.");
                                }
                                
-                               $response = $this->http->send(new Request('GET', $family.'/'.$filename), [
-                                       // https://github.com/guzzle/guzzle/issues/2735
-                                       'sink' => \GuzzleHttp\Psr7\stream_for(fopen("php://temp", "w+")),
-                               ]);
+                               $response = $this->http->send(new Request('GET', $family.'/'.$filename));
                                
                                $file = new AtomicWriter($familyDirectory.'/'.$filename);
                                while (!$response->getBody()->eof()) {
index a3dd16ef89cebb7f828899bf5abf065a95593331..447d4f794d52cdaa9286fd06ff84368460f0bc27 100644 (file)
@@ -190,10 +190,7 @@ final class HTTPRequest {
                $request = new Request($this->options['method'], $this->url, $headers, $this->body);
                
                try {
-                       $this->response = $client->send($request, [
-                               // https://github.com/guzzle/guzzle/issues/2735
-                               'sink' => \GuzzleHttp\Psr7\stream_for(fopen("php://temp", "w+")),
-                       ]);
+                       $this->response = $client->send($request);
                }
                catch (TooManyRedirectsException $e) {
                        throw new HTTPException(