优惠全部云服务器首月 8 折,优惠码 CLOUD去领取

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

· 阅读约 1 分钟

 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, ‘.’, ”);
    }

即可。

相关文章

更多「网站和优化」文章服务器使用指南