分享

ecshop配送方式出错lib_common.php on line 959

 abcen 2020-11-06

ecshop只带的配送方式BUG
只要不是正式商业版的ECSHOP都会出现 配送方式配置出错。提示
Warning: number_format() expects parameter 1 to be double, string given in D:\**\lib_common.php on line 959

Warning: number_format() expects parameter 1 to be double, string given in D:\**\lib_common.php on line 959
原因是配送插件里面的免费额度为0,ec本身的bug导致了$price的值为空值,直接调用number_format出现了错误。
修改:
将includes\lib_common.php 的957~959行:
  else
    {
        $price = number_format($price, 2, '.', '');
    }

修改为

  else 
    {
        if(!$price){
                $price = 0;
        }
        $price = number_format($price, 2, '.', '');
    }

即可。
 

下一篇: 屏蔽ecshop云提示no_license 上一篇: ecshop出现includes\cls_template.php on line 1140错误解决

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章