问题背景:在使用Easy Digital Downloads的edd alipay支付网关插件时,在php7.2及以上版本时报此错误文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
报错内容:[highlight color="yellow"]Use of undefined constant- assumed '' (this will throw an Error in a future version of PHP)[/highlight]文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
原因分析:php7.2及以上版本从新规定了常量的命名方式,需要带引号文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
解决办法:文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
原代码 [highlight color="yellow"]$settings[alipay_payment_edd]=$alipay_settings;[/highlight]文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
修改后的代码 [highlight color="yellow"]$settings['alipay_payment_edd']=$alipay_settings;[/highlight]文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html 文章源自 吾爱分享 吾爱分享网-https://www.wuaishare.cn/122.html
评论