Ecshop程序网站下订单出现number_format()函数报错解决方案

By:Anna Scaret
1 min read2021-09-22 10:35:26

最近高速度 主机小编遇到一个客户网站提交订单的时候出现报错: number_format()函数报错,Warning: number_format() expects parameter 1 to be double, 这个报错提示报错位置是includeslib_common.php on line 959于是高速度 主机(www.gaosudu.com)小编找到报错行,另加报错的提示是少了某个参数,最终找到问题解决方法如下:将includeslib_common.php 的957~959行:else{$price = number_format($price, 2, '.', '');}修改为else{if(!$price){$price = 0;}$price = number_format($price, 2, '.', '');}关于这个错误产生的原因可能是ecshop本身的bug问题导致的,原因是配送插件里面的免费额度为0,ecshop程序的bug导致了$price的值为空值,直接调用number_format出现了错误。这边重置一下即可。相关文章推荐阅读:关闭ECSHOP的云提示 NO_LICENSE解决办法ECSHOP访问首页一直跳转到安装目录解决方案ECSHOP后台上传图片后强制转换成JPG格式的小BUG的调试方法
本文地址:https://www.gaosudu.com/ecshop/14180.html