• coccinelle6

    (@coccinelle6)


    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”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have noticed same in recent error logs and can confirm direct access causes this error.

    Checking recent logs, all IPs from which direct requests were made come from China Unicom Shandong Province Network.

    I have the same issue and would also be glad if the proposed patch would make it into the next update of the plugin.

    Thanks and best regards, Greg

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“undefined function plugin_basename()”’ is closed to new replies.