Skip to content

Commit

Permalink
Merge pull request parse-community#165 from sahanh/patch-1
Browse files Browse the repository at this point in the history
Support empty query
  • Loading branch information
gfosco committed Oct 21, 2015
2 parents f1f3e14 + 8e7d135 commit 69093d7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Parse/ParsePush.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ public static function send($data, $useMasterKey = false)
}
if (isset($data['where'])) {
if ($data['where'] instanceof ParseQuery) {
$data['where'] = $data['where']->_getOptions()['where'];

$where_options = $data['where']->_getOptions();

if (!isset($query_where['where'])) {
$data['where'] = '{}';
} else {
$data['where'] = $data['where']->_getOptions()['where'];
}

} else {
throw new Exception(
'Where parameter for Parse Push must be of type ParseQuery'
Expand Down

0 comments on commit 69093d7

Please sign in to comment.