Parse platform PHP SDK中的查询不存在的ParseInstallation';行不通

Parse platform PHP SDK中的查询不存在的ParseInstallation';行不通,parse-platform,Parse Platform,我有一个自定义的“安装”,名为“组织id” 当我从管理面板运行筛选器以发送“organization_id”为1的推送时,它可以工作,但是当我使用PHP SDK时,请参见代码,它会给我“You sent this push notification to 0 recipients” 管理面板中推送成功的“完整目标”是 Targeting : organization_id is "1" deviceType is "android" Full target : { "or

我有一个自定义的“安装”,名为“组织id”

当我从管理面板运行筛选器以发送“organization_id”为1的推送时,它可以工作,但是当我使用PHP SDK时,请参见代码,它会给我“You sent this push notification to 0 recipients”

管理面板中推送成功的“完整目标”是

Targeting : organization_id is "1"
            deviceType is "android"
Full target : { "organization_id": "1", "deviceType": "android" }
对于PHP SDK中不起作用的一个,是:

Targeting : where advanced operator (organization_id "1")
            deviceType is any of "android", "winphone" or "js"
Full target : { "where": { "organization_id": "1" }, "deviceType": { "$in": [       "android", "winphone", "js" ] } }

问题似乎在于您传递的变量的类型。我假设字段
organization\u id
的类型为
Number
,但您传递的是字符串

我在Installation类中使用了badge列,它的类型是
Number
,当传入where约束的字符串时,它不起作用。传入一个整数就可以了


我很确定这是您的问题。

问题在于Parse PHP SDK 1.0.0。此问题已通过1.0.1的更新得到修复。我猜是在第42行的ParsePush.php中

$data['where'] = $data['where']->_getOptions();
现在是

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

你找到解决办法了吗?我也有同样的问题
$data['where'] = $data['where']->_getOptions()['where'];