提交的内容
This commit is contained in:
6
vendor/guzzlehttp/promises/src/Utils.php
vendored
Executable file → Normal file
6
vendor/guzzlehttp/promises/src/Utils.php
vendored
Executable file → Normal file
@ -21,7 +21,7 @@ final class Utils
|
||||
*
|
||||
* @param TaskQueueInterface|null $assign Optionally specify a new queue instance.
|
||||
*/
|
||||
public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface
|
||||
public static function queue(?TaskQueueInterface $assign = null): TaskQueueInterface
|
||||
{
|
||||
static $queue;
|
||||
|
||||
@ -144,7 +144,9 @@ final class Utils
|
||||
$results[$idx] = $value;
|
||||
},
|
||||
function ($reason, $idx, Promise $aggregate): void {
|
||||
$aggregate->reject($reason);
|
||||
if (Is::pending($aggregate)) {
|
||||
$aggregate->reject($reason);
|
||||
}
|
||||
}
|
||||
)->then(function () use (&$results) {
|
||||
ksort($results);
|
||||
|
||||
Reference in New Issue
Block a user