“undefined function plugin_basename()”
-
Hello,
First, d?mo arigat? for this fantastic contact form. Second, since I installed it, I often see in my PHP log:
PHP Fatal error: Uncaught Error: Call to undefined function plugin_basename() in /wp-content/plugins/contact-form-7/wp-contact-form-7.php:19\nStack trace:\n#0 {main}\n thrown in /wp-content/plugins/contact-form-7/wp-contact-form-7.php on line 19
I am able to reproduce this error when I access directly “wp-contact-form-7.php” without being logged in. So, my guess is that ill-intentioned bots or ill-intentioned visitors are directly hitting “wp-contact-form-7.php”. Now, I am not a plug-in coder, but I often see plug-ins using this strategy:
// exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; }
Please use a similar strategy in “wp-contact-form-7.php”.
- The topic ‘“undefined function plugin_basename()”’ is closed to new replies.