Skip to content

Commit af072f6

Browse files
authored
Add check whether $cancellable is an object
1 parent 43edd65 commit af072f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Internal/CancellationQueue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __invoke(): void
2222

2323
public function enqueue($cancellable): void
2424
{
25-
if (!\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) {
25+
if (!\is_object($cancellable) || !\method_exists($cancellable, 'then') || !\method_exists($cancellable, 'cancel')) {
2626
return;
2727
}
2828

0 commit comments

Comments
 (0)