We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is non-strict array searching in side the CompositeDisposable that cause unexpected/incorrect results in some situations:
CompositeDisposable
Reproducing code:
<?php use React\EventLoop\Factory; use Rx\Observable; use Rx\Observer\CallbackObserver; use Rx\Testing\TestScheduler; require_once __DIR__ . '/vendor/autoload.php'; $loop = Factory::create(); $scheduler = new TestScheduler(); $o = Observable::interval(500) ->merge(Observable::range(1,3)) ->take(5) ->subscribe(new CallbackObserver(function ($x) { echo "Next: $x\n"; }, function (Exception $exception) { echo "Err\n"; }, function () { echo "Complete\n"; }), $scheduler); $scheduler->start();
Expected output:
Next: 1 Next: 2 Next: 3 Next: 0 Next: 1 Complete
Actual output:
Next: 1 Next: 2 Next: 3
This is caused by CompositeDisposable finding the incorrect Disposable here:
Disposable
RxPHP/lib/Rx/Disposable/CompositeDisposable.php
Line 48 in 7c7d858
This is can be corrected by enforcing strict comparison (passing true as the third argument to array_search)
true
array_search
PR on the way.
The text was updated successfully, but these errors were encountered:
Fix non-strict search in CompositeDisposable Fixes ReactiveX#107
ba2ba75
Merge pull request #108 from mbonneau/issue107
c17fb6c
Fix non-strict search in CompositeDisposable Fixes #107
6c7292f
No branches or pull requests
There is non-strict array searching in side the
CompositeDisposable
that cause unexpected/incorrect results in some situations:Reproducing code:
Expected output:
Actual output:
This is caused by
CompositeDisposable
finding the incorrectDisposable
here:RxPHP/lib/Rx/Disposable/CompositeDisposable.php
Line 48 in 7c7d858
This is can be corrected by enforcing strict comparison (passing
true
as the third argument toarray_search
)PR on the way.
The text was updated successfully, but these errors were encountered: