Skip to content

Commit 0cf7694

Browse files
committed
Fixes after successful tests with Atlas dev
1 parent cc478a8 commit 0cf7694

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ public function listIndexes(array $options = [])
10071007
* @throws InvalidArgumentException for parameter/option parsing errors
10081008
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
10091009
*/
1010-
public function listSearchIndexes(string $name, array $options = []): Traversable
1010+
public function listSearchIndexes(?string $name = null, array $options = []): Traversable
10111011
{
10121012
$filter = [];
10131013
if ($name) {

src/Operation/CreateSearchIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,6 @@ private function executeCommand(Server $server): void
106106
'indexes' => $this->indexes,
107107
];
108108

109-
$server->executeWriteCommand($this->databaseName, new Command($cmd));
109+
$server->executeCommand($this->databaseName, new Command($cmd));
110110
}
111111
}

src/Operation/UpdateSearchIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(string $databaseName, string $collectionName, string
6262
throw new InvalidArgumentException('Index name cannot be empty');
6363
}
6464

65-
if (! is_array($definition) || ! is_object($definition)) {
65+
if (! is_array($definition) && ! is_object($definition)) {
6666
throw InvalidArgumentException::invalidType('$definition', $definition, 'array or object');
6767
}
6868

0 commit comments

Comments
 (0)