PHP 8.0 升级后命名参数报 Unknown named parameter 怎么回退 陆零云 2026-11-10 13:22:31 30 0 升级到 PHP 8.0.30 后,退款接口报 Error: Unknown named parameter $order_id,栈顶停在 call_user_func_array。这段代码三年没动过,7.4 上跑得好好的。 参数是表单里攒出来的关联数组,['order_id' => 88123, 'amount' => 990, 'reason' => '重复支付'],直接丢给 call_user_func_array。PHP 8 之前字...
PHP 8 报 Trying to access array offset on value of type null 怎么改 陆零云 2026-11-07 10:05:50 50 0 现象:页面缺数据,日志里刷满 warning 项目从 PHP 7.2 升到 8.x 之后,日志里反复出现 Warning: Trying to access array offset on value of type null in /www/app/list.php on line 42,前台表现为某些字段空白,部分列表直接少了几行,但页面本身不报 500。 原因:拿 null 当数组用了 PHP 7.4 起,对 null 取数组下标从 notice...