여러분 중 얼마나 많은 사람들이 parse.com 플랫폼에 익숙한 지 모르지만 웹 사이트에 링크 된 타사 PHP 라이브러리를 활용하고 있으며 몇 가지 문제가 있습니다. .PHP Parse.com 쿼리 오류
내 DB를 조회하려고하지만 내 코드가 정확하지만 오류가 라이브러리에 포함 된 파일 중 하나에서 유래 내가 무엇을 볼 수에서 Notice: Trying to get property of non-object.
를 반환 유지합니다. 오류를 던지고있다
function storeInParseDB ($message, $unit) {
$parse = new parseQuery($class = 'PushNotifications');
$parse->whereEqualTo('unit', $unit);
$result = $parse->find();
echo "RESULT: ";
print_r($result);
}
코드 : 어떤 도움을 크게 감상 할 수
private function checkResponse($response,$responseCode,$expectedCode){
//TODO: Need to also check for response for a correct result from parse.com
if($responseCode != $expectedCode){
$error = json_decode($response);
$this->throwError($error->error,$error->code);
}
else{
//check for empty return
if($response == '{}'){
return true;
}
else{
return json_decode($response);
}
}
}
여기에 지금까지 내 코드입니다.
오류가있는 줄을 지적 해 주시겠습니까? – Ifthikhan
줄 176은 다음과 같습니다 : $ this-> throwError ($ error-> error, $ error-> code); 어딘가에 json_decode 함수와 관련이 있다고 말한 것을 읽은 것 같습니다. –
https://github.com/apotropaic/parse.com-php-library/issues/30 –