ecshop错误提示:Deprecated: Assigning the return value of new by reference is deprecated

 ecshop安装使用  1097浏览

ecshop后台操作,商品批量双传页面出现Deprecated: Assigning the return value of new by reference is deprecated的错误,具体错误提示如下:

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\goods_batch.php on line 921

首先,如果按照官方的ecshop安装运行环境要求是肯定不会报错的,我用的php版本是5.5的,出现此错误的原因是:php5.3开始后,废除了php中的”=&”符号,所以要想复制,直接用=引用即可。

因此修改就很简单了。

找到admin目录下的goods_batch.php,大概在921行


$filter = &new stdclass;

改成

$filter = new stdclass;

即把&符号去掉,就可以解决此错误了。

以下是其他地方出现Deprecated: Assigning the return value of new by reference is deprecated错误提示的解决方法。

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 46

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 47

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 68

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 79

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 90

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\admin\sitemap.php on line 102

Deprecated: Assigning the return value of new by reference is deprecated in C:\develop\wamp\www\ecshopdev\includes\lib.debug.php on line 303

怎么修改该错误提示,就不再写代码演示了。参考之前的修改方式吧。

流行热度:超过1097次围观
生产日期:2016-03-12 21:30:50
上次围观:2016-09-18 14:54:12
转载时必须以链接形式注明原始出处及本声明。

与本文相关的文章