ecshop页面报Non-static method cls_image__gd_version() 错误的解决方法!

2019-06-21 13:54:15长沙做网站严微
Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\shop\xampp-portable\htdocs\ecshop\includes\lib_base.php on line 347

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in D:\shop\xampp-portable\htdocs\ecshop\includes\lib_base.php on line 347

具体方法是:

将347行的代码:
return cls_image::gd_version();
改为:
$p = new cls_image();
return $p->gd_version();

Strict Standards: Non-static method cls_image::gd_version() should not be called statically in ...install\includes\lib_installer.php on line 31

在安装ECShop 2.7.3时出现了以上错误,是因为在程序中静态调用了非静态方法,这是ECShop程序员的疏忽造成的。

ECShop根目录下面的install/includes/lib_installer.php

然后搜索以下代码
function get_gd_version()
{
    include_once(ROOT_PATH . 'includes/cls_image.php');

    return cls_image::gd_version();
}
复制代码
将以上代码修改为以下代码
function get_gd_version()
{
    include_once(ROOT_PATH . 'includes/cls_image.php');
        $cls_image=new cls_image();
    return $cls_image->gd_version();
}

上一篇:

ecshop的jQuery冲突问题之最简单的解

下一篇:

没有了 返 回

Copyright © 2009-2019 Ywcms.Com All Right Reserved.  湖南严微网络科技有限公司©版权所有   湘ICP备16006489号-2