Skip to content

Commit 2f9bed3

Browse files
committed
Avoid PHPC-2457
1 parent 8c1ea72 commit 2f9bed3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Operation/FindFunctionalTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\Attributes\DataProvider;
1515
use stdClass;
1616

17+
use function is_array;
1718
use function microtime;
1819

1920
class FindFunctionalTest extends FunctionalTestCase
@@ -42,6 +43,11 @@ public function testModifierDocuments($modifiers, stdClass $expectedSort): void
4243
{
4344
(new CommandObserver())->observe(
4445
function () use ($modifiers): void {
46+
// @todo revert this lines after PHPC-2457
47+
if (is_array($modifiers)) {
48+
$modifiers = [...$modifiers];
49+
}
50+
4551
$operation = new Find(
4652
$this->getDatabaseName(),
4753
$this->getCollectionName(),

0 commit comments

Comments
 (0)