1
0
Fork 0

Fix support for react/promise 2.x

pull/11601/head
Jordi Boggiano 2023-08-30 11:38:36 +02:00
parent bbd2c9613e
commit 094fb6cd70
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class HttpDownloader
throw new \InvalidArgumentException('$url must not be an empty string');
}
[$job, $promise] = $this->addJob(['url' => $url, 'options' => $options, 'copyTo' => null], true);
$promise->catch(function (\Throwable $e) {
$promise->then(null, function (\Throwable $e) {
// suppress error as it is rethrown to the caller by getResponse() a few lines below
});
$this->wait($job['id']);