diff --git a/src/Parse/ParseQuery.php b/src/Parse/ParseQuery.php old mode 100755 new mode 100644 index c024aaf6..493b2bc0 --- a/src/Parse/ParseQuery.php +++ b/src/Parse/ParseQuery.php @@ -112,11 +112,7 @@ public function get($objectId, $useMasterKey = false) */ public function equalTo($key, $value) { - if ($value === null) { - $this->doesNotExist($key); - } else { - $this->where[$key] = $value; - } + $this->where[$key] = $value; return $this; } diff --git a/tests/Parse/ParseQueryTest.php b/tests/Parse/ParseQueryTest.php index d773bb9c..2d278b1c 100644 --- a/tests/Parse/ParseQueryTest.php +++ b/tests/Parse/ParseQueryTest.php @@ -2115,11 +2115,20 @@ function ($i) { return $obj; } ); + $this->saveObjects( + 2, + function ($i) { + $obj = ParseObject::create('TestObject'); + $obj->set('num', null); + + return $obj; + } + ); $query = new ParseQuery('TestObject'); $query->equalTo('num', null); $results = $query->find(); $this->assertEquals( - 0, + 2, count($results), 'Did not return correct number of objects.' );