Преглед изворни кода

Don’t pass projection field through to mongod if it’s an empty array

Rob Williams пре 8 година
родитељ
комит
ba5ea5da94
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      lib/Alcaeus/MongoDbAdapter/AbstractCursor.php

+ 1 - 1
lib/Alcaeus/MongoDbAdapter/AbstractCursor.php

@@ -276,7 +276,7 @@ abstract class AbstractCursor
             $converter = 'convert' . ucfirst($option);
             $value = method_exists($this, $converter) ? $this->$converter() : $this->$option;
 
-            if ($value === null) {
+            if ($value === null || ($option === 'projection' && $value === [])) {
                 continue;
             }