Commit b44164c5 authored by Nick Dresselhaus's avatar Nick Dresselhaus Committed by Jeremy Mikola

PHPLIB-189: Fix merging of comment and maxTimeMS options

Previously, the values were set to an empty value, which causes exceptions within the driver.
parent 749f0aa0
...@@ -218,11 +218,11 @@ class Find implements Executable ...@@ -218,11 +218,11 @@ class Find implements Executable
$modifiers = empty($this->options['modifiers']) ? [] : (array) $this->options['modifiers']; $modifiers = empty($this->options['modifiers']) ? [] : (array) $this->options['modifiers'];
if (isset($this->options['comment'])) { if (isset($this->options['comment'])) {
$modifiers['$comment'] = $options['comment']; $modifiers['$comment'] = $this->options['comment'];
} }
if (isset($this->options['maxTimeMS'])) { if (isset($this->options['maxTimeMS'])) {
$modifiers['$maxTimeMS'] = $options['maxTimeMS']; $modifiers['$maxTimeMS'] = $this->options['maxTimeMS'];
} }
if ( ! empty($modifiers)) { if ( ! empty($modifiers)) {
......
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