Commit 771316b1 authored by Derick Rethans's avatar Derick Rethans Committed by Jeremy Mikola

Because the typemap says 'document as array', we now need to change the return…

Because the typemap says 'document as array', we now need to change the return value with a cast to 'object'
parent 3558cfa8
......@@ -140,11 +140,11 @@ class FindAndModify implements Executable
return null;
}
if ( ! is_object($result['value'])) {
if ( ! is_array($result['value'])) {
throw new UnexpectedValueException('findAndModify command did not return a "value" document');
}
return $result['value'];
return (object) $result['value'];
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment