Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Notice: Trying to get property of non-object in

Status
Not open for further replies.
Joined
Jan 10, 2010
Posts
14
Reaction score
0
Hello,

I have this error now when I run my php code:


Notice: Trying to get property of non-object in C:\Program Files\EasyPHP5.3.0\www\New Folder\trial.php on line 39

Line 39 is: printf('<a href="%s" title="%s">%s (%d) %s %s</a>', $obj->imdburl, $obj->title, $obj->title, $obj->year, $obj->country, $obj->genres);

I read online that it maybe to do with the error reporting in the php.ini file and the default should be: Default Value: E_ALL & ~E_NOTICE

Mine is and it still has the error any ideas anyone?
 
It means you are trying to access something that isn't there

e.g. a field, or part of the object

$obj->imdburl, $obj->title, $obj->title, $obj->year, $obj->country, $obj->genres

one, or all of the fields (items after ->) aren't properly setup

if you do a
Code:
die(print_r($obj));

on line 38 may help you see what is contained in $obj
 
Hi,

Thanks that did show me what was is contained. It is correct so maybe it is something to do with Caching?
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.
      Helmuts @ HelmutsHelmuts is verified member.: Good morning all
      Top Bottom