OZONE Asylum
FAQ
What is the cause of the error 'Call to a member function on a non-object'?
This page's ID:
5733
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "What is the cause of the error 'Call to a member function on a non-object'?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
It usually occurs when you are hacking a script or joining 2 scripts together. It basically means one of 2 things: 1. Clash of naming conventions. (meaning some code clobbered the variable you're trying to call as an object) 2. Object not being instanciated. (meaning you forgot to 'make' the object) 3. Calling -> on an variable that is not an object (because you misstyped the variables' name (use error_reporting(E_ALL) to fix that), or because you are using the wrong one) DmS has supplied a little bit of script which will dump the variable data onto the page: [code]print("<pre>"); print_r([b]$variable[/b]); print("</pre>");[/code] This should help you spot if there is a clash of naming conventions otherwise you will have to pik through your script to identify where the problem with the object comes in. ---------------------------- Relevant links: [url=http://www.gurusnetwork.com/discussion/thread/2109/]Error: Call to a member function on a non-object[/url] ______________________ [internallink=4626]Emperor[/internallink] [small](Edited by [internallink=1424]Tyberius Prime[/internallink] on 04-15-2004 04:50)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »