liufumingren 276a6ef37d fix(chat): 修复 PHP 7.4 升级引发的其余告警(implode 弃用、null 取下标)
全量检查 chat 相关代码(Chat.php / qiwe/Index.php / library/chat/Orders.php
/ library/qiwe / new_wms/Forward.php),补齐升级后才暴露的问题:

1. implode 参数反序(4 处,PHP 7.4 起 E_DEPRECATED,TP5 会抛成异常):
   Chat.php 群列表/指令/门店查询里  implode(\," and ")
   -> implode(" and ", \),输出 SQL 完全一致
2. carriage 查运费:getOrderInfoByPostnum 未命中返回 false,
   if(\["ID"]) 在 7.4 会抛 bool 取下标 -> 改为 if(\ && \["ID"])
3. kdroomMessageExplpde2 队列消费:json_decode 失败时 \ 为 null,
   补 is_array 判断跳过脏数据
4. qiwe/Index.php 5 处接口返回 json_decode 后直接用 \["code"]:
   补 \ && 前置判断(getRoomList/batchGetRoomDetails/
   batchGetUserinfo/sendImage/sendFile),避免空返回时抛 notice
5. chat/Orders.php createOrderToWms:订单回查为 null 时取 POSTNUM/ID/
   ERRORRECORDS 的兜底,改为 empty() 与 ??

以上均为 7.4 兼容性修复,业务行为保持不变。

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-22 14:23:27 +08:00
..