我正在研究wordpress项目它工作正常
当我更新PHP版本7.2.0时,我收到这样的警告:
警告:使用未定义的常量WP_GURUS_DEBUG - 在C:\ wamp\www\wordpress1\wp-content\plugins\post-my-contact-form-7中假定为'WP_GURUS_DEBUG'(这将在未来版本的PHP中引发错误)第9行包含\ wordpress-gurus-debug-api.php
我的wordpress版本是4.9.1
我的插件:
发表我的CF7表格 版本3.2.0
这是插件文件:
<?php
/**
* Error logging and notices
* @since 1.0.0
* @var string $message to log if in debug mode
*/
if( !function_exists('debug_msg') ){
if (true === WP_DEBUG || true === WP_GURUS_DEBUG) {
$debug_msg_last_line='';
$debug_msg_last_file='';
}
function debug_msg($message,$prefix='') {
if (true === WP_DEBUG || true === WP_GURUS_DEBUG) {
global $debug_msg_last_line,$debug_msg_last_file;
$backtrace = debug_backtrace();
$file = $backtrace[0]['file'];
$files = explode('/',$file);
$dirs = explode('/',plugin_dir_path( __FILE__ ));
$files …Run Code Online (Sandbox Code Playgroud)