Skip to content

Commit b2e13a5

Browse files
derickrjmikola
authored andcommitted
Because the typemap says 'document as array', we now need to change the return value with a cast to 'object'
1 parent aac0abc commit b2e13a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Operation/FindAndModify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ public function execute(Server $server)
140140
return null;
141141
}
142142

143-
if ( ! is_object($result['value'])) {
143+
if ( ! is_array($result['value'])) {
144144
throw new UnexpectedValueException('findAndModify command did not return a "value" document');
145145
}
146146

147-
return $result['value'];
147+
return (object) $result['value'];
148148
}
149149

150150
/**

0 commit comments

Comments
 (0)