Series of php errors | Peter's Custom Anti-Spam for WordPress | Forum
Back to the custom anti-spam plugin page


6:19 pm
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
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:
die ('Not intended for direct access.');
}