Arrow

Series of php errors | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

Series of php errors

Reply to Post Add a New Topic
UserPost

6:19 pm
December 16, 2008


Todd

Guest

Peter, I appreciate your help.

I am getting the following series of errors repeatedly in my log, can anyone help?:

[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Notice: Trying to get property of non-object in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 59
[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Notice: Trying to get property of non-object in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 152
[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Notice: Trying to get property of non-object in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 158
[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Notice: Trying to get property of non-object in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 161
[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Notice: Use of undefined constant get_option – assumed 'get_option' in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 409
[Tue Dec 16 09:37:00 2008] [error] [client 64.88.164.198] PHP Fatal error: Call to undefined function add_action() in …/wp-content/plugins/peters-custom-anti-spam-image/custom_anti_spam.php on line 422

8:52 pm
December 16, 2008


Peter

Admin

posts 732

Looks robots (or humans) directly accessing the plugin file. The notices appear because you probably have a sensitive error logger; however, no matter what, you’d get the last error message because the plugin file is being directly loaded. Add this to the top of the plugin file:

if (file_exists('custom_anti_spam.php') && empty($_GET)) {
    die ('Not intended for direct access.');
}
Reply to Post

Reply to Topic:
Series of php errors

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
6 + 2