Skip to content
This repository has been archived by the owner on Feb 25, 2018. It is now read-only.

"Trying to get property of non-object" error #145

Open
michalbobo opened this issue Apr 22, 2014 · 6 comments
Open

"Trying to get property of non-object" error #145

michalbobo opened this issue Apr 22, 2014 · 6 comments

Comments

@michalbobo
Copy link

Hi,
I'm being stuck on using this library. I'm trying to just save a new object the same way as in the example but i'm getting php notice "Trying to get property of non-object". It seems like $response is FALSE. I'm running on localhost - XAMPP. Is there any fix for this or am I doing something wrong?
Thanks.

@Wanted33
Copy link

Hi ,

Can you put an exemple of your request to save your new object to help you ?

I can show you an exemple of a request to save a new object if you want. For exemple to save an article we can do :

$parse = new parseObject('Articles');
$parse->article_author = array("__type" => "Pointer", "className" => "_User", "objectId" => $userID);
$parse->articles = $content;
$r = $parse->save();

(with $content = $_POST['content'])

I hope i can help you.

@michalbobo
Copy link
Author

Hi,
thanks for response. However it's not a syntax problem or anything. When I move my project to web hosting it is correctly working. When I'm trying to run my project on localhost, there is some kind of SSL problem and therefore parse is not responding ($response = FALSE).

@Wanted33
Copy link

Hi,

Is the option "short_open_tags" is enable when you make a ?

@michalbobo
Copy link
Author

I tried to turn ON short_open_tags, restart my server and everything but I'm still getting the same error..

@michalbobo
Copy link
Author

OK, so the problem is definitely the SSL. I added "curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);" to request() in parse.php and it works. Allthough this is just a temporary solution...

@Wanted33
Copy link

Wanted33 commented May 3, 2014

HI,

I'm sorry but i don't know where the problem come from and i haven't got solutions to help you :/. But i think you can keep your temporary solution for the moment :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants