Skip to content

Fix is_object() check on rejections with truthy non-Exception values#40

Closed
esroyo wants to merge 1 commit intoclue:masterfrom
esroyo:master
Closed

Fix is_object() check on rejections with truthy non-Exception values#40
esroyo wants to merge 1 commit intoclue:masterfrom
esroyo:master

Conversation

@esroyo
Copy link

@esroyo esroyo commented Mar 26, 2019

When React\Promise\some() returns an array of Exceptions as the resolved value, then Block\await fails on that promise. Turns out this bug bypassed all tests because $exception was always tested with falsy values, so ($exception) ? get_class($exception) : gettype($exception) was passing anyway. But when $exception is a non empty array (of Exceptions), this bug emerges.

@clue
Copy link
Owner

clue commented Apr 9, 2019

@esroyo Thank you for filing this PR and for your patience, I've just applied the relevant changes via #42! :shipit:

@esroyo
Copy link
Author

esroyo commented Apr 9, 2019

Thanks to you @clue 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants