You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PHP Warning: get_class() expects parameter 1 to be object, string given in /phalcon/vendor/clue/block-react/src/functions.php on line 90
PHP Fatal error: Uncaught UnexpectedValueException: Promise rejected with unexpected value of type in /phalcon/vendor/clue/block-react/src/functions.php:89
Stack trace:
#0 /phalcon/vendor/clue/block-react/src/functions.php(198): Clue\React\Block\await(NULL, Object(React\EventLoop\StreamSelectLoop), NULL)
#1 /phalcon/app/tasks/RunTask.php(96): Clue\React\Block\awaitAll(NULL, Object(React\EventLoop\StreamSelectLoop))
I'm building my promises with the following code:
$promises[] = $this->getTrades($rule->id, $exchange->id)
->then(
function ($trades) use ($handleTrades) {
foreach ($tradesas$trade) {
$handleTrades[] = $trade;
}
}
);
@mpjraaij Thank you for reporting! This is indeed a small bug in this library, @Furgas has just filed PR #37 to fix this 👍
That being said, this only happens if you reject a promise with a scalar value instead of a an Exception. There's ongoing discussion to enforce Exception objects in the future, so I suppose it's a good idea to update your code to use an Exception just in case: reactphp/promise#46
Hi there,
I am getting this error code:
I'm building my promises with the following code:
The function is like this:
How do I solve this?
The text was updated successfully, but these errors were encountered: