php7.2版本以上支付宝h5支付报错
知识付费使用PHP7.2以上版本时h5支付宝支付报错
系统错误
The each() function is deprecated. This message will be suppressed on further calls
原因:PHP7.2废除了each()函数
解决:找到AopClient.php文件 buildRequestForm方法中 each修改为forcach
foreach($para_temp as $key=>$val){
if (false === $this->checkEmpty($val)) {
//$val = $this->characet($val, $this->postCharset);
$val = str_replace("'","'",$val);
//$val = str_replace("\"",""",$val);
$sHtml.= "<input type='hidden' name='".$key."' value='".$val."'/>";
}
}
下图为需要修改的位置