bug #2776

Deprecated: Assigning the return value of new by reference is deprecated

Added by 龙 辉 over 5 years ago. Updated over 5 years ago.

Status:进行中 Start date:11/28/2014
Priority:Normal Due date:11/28/2014
Assignee:龙 辉 % Done:

0%

Category:- Spent time: -
Target version:-

Description

如果你的程序版本没有更新,使用的语法太旧。就会出现类似这样的警告提示,wordpress的讯息:
Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-settings.php on line 264

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-settings.php on line 266

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-settings.php on line 267

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-settings.php on line 284

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/xxx/public_html/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/exxx/public_html/wp-includes/theme.php on line 540

解决方法:

找到警告讯息的程序,将程序修改,例如上面的提示是wp-settings.php档案的第264列

原本是以下,将&删除

$wp_locale = & new WP_Locale();

修改成为

$wp_locale = new WP_Locale();

这样应该就不会出现这个讯息了。

History

#1 Updated by 龙 辉 over 5 years ago

在 446 行,问题依然存在

wp-config.php

@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'Off' );
define( 'WP_DEBUG', false );
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );

http://codex.wordpress.org/Editing_wp-config.php#Debug

Also available in: Atom PDF