1
0
mirror of https://github.com/danog/amp.git synced 2025-01-22 05:11:42 +01:00

Resolve correct Success arg in empty any\(\) combinator

This commit is contained in:
Daniel Lowrey 2015-05-15 15:58:43 -04:00
parent 93eb8ad8de
commit 631a6089d9
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
### HEAD
- Fixed bug preventing correct resolution of any() combinator promise
when passed an empty array
- Suggest nearby property name in Struct error messages
- Add offending generator key to error message when resolving coroutines
that yield incorrect values to assist in debugging.

View File

@ -256,7 +256,7 @@ function some(array $promises) {
*/
function any(array $promises) {
if (empty($promises)) {
return new Success([], []);
return new Success([[], []]);
}
$results = [];