|
| Author |
Message |
Triumvirate
Joined: 24 Feb 2004
Posts: 169
Location: NY, USA
|
Posted: 3/9/2006, 1:24 am Post subject: PHP Fatal Error |
|
|
| Quote: |
| Fatal error: Call to a member function on a non-object in blah/blah/functions.php on line 7 |
Can anyone tell me, in general, what this relates to? I've been looking for exactly what it means so I can troubleshoot it but I haven't been able to find anywhere that says in general what causes this problem in the first place.
Thanks. |
|
| Back to top |
|
 |
Keith
Moderator
Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland
|
Posted: 3/9/2006, 1:26 pm Post subject: |
|
|
It usually means that a method (function inside a class) was not found or does not exist. It could also mean that a function (outside of a class) does not exist. _________________ Keith McLaughlin - DeveloperCube Moderator
Web Hosting Directory - Freelance Web Design - Webmaster Resources |
|
| Back to top |
|
 |
Triumvirate
Joined: 24 Feb 2004
Posts: 169
Location: NY, USA
|
Posted: 3/9/2006, 10:18 pm Post subject: |
|
|
Alright that's kind of what I figured. My only problem is, I'm using the PEAR template package. I'm creating a function which puts things into the various $template-> things. I'm guessing I have to re-add the declaration (if that's the right word for it) of the class to the function even though it already appears in the page where I will be using the function? Or am I way off? _________________ GamingMMO.com |
|
| Back to top |
|
 |
Keith
Moderator
Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland
|
Posted: 3/9/2006, 10:30 pm Post subject: |
|
|
I'm not sure. Read line 7, find out what's being called and make sure the file that contains the function or method being called is being included/required or referenced properly. _________________ Keith McLaughlin - DeveloperCube Moderator
Web Hosting Directory - Freelance Web Design - Webmaster Resources |
|
| Back to top |
|
 |
Triumvirate
Joined: 24 Feb 2004
Posts: 169
Location: NY, USA
|
Posted: 3/9/2006, 11:05 pm Post subject: |
|
|
Thanks, yeah I got it working now...at least...that part anyway. Quick question, if I get an error on a page and I want the page to stop at that point (i.e if a user doesn't fill in a form field it should trigger an error once they hit submit and not continue and try to put what they have into the database) what would I use? I assume there is a function of some kind to stop the page processing? _________________ GamingMMO.com |
|
| Back to top |
|
 |
Keith
Moderator
Joined: 28 Jan 2004
Posts: 427
Location: Dublin, Ireland
|
|
| Back to top |
|
 |
Triumvirate
Joined: 24 Feb 2004
Posts: 169
Location: NY, USA
|
Posted: 3/10/2006, 11:17 pm Post subject: |
|
|
Thanks, I remembered a couple minutes after posting that it was exit() which worked.
Thanks again. _________________ GamingMMO.com |
|
| Back to top |
|
 |
|