From 18e71af8cc4eebcd73eeb70a252894c9a427b830 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 14 Jan 2026 11:57:18 +0800 Subject: [PATCH] 1 --- app/common/service/UsedCarService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/common/service/UsedCarService.php b/app/common/service/UsedCarService.php index 3b26bbf..804c980 100644 --- a/app/common/service/UsedCarService.php +++ b/app/common/service/UsedCarService.php @@ -141,7 +141,11 @@ class UsedCarService $asc = ord($s[0]); if ($asc >= 65 && $asc <= 90) return $char; - + + // 转码失败或长度不足 + if ($s === false || strlen($s) < 2) { + return ''; + } $code = ord($s[0]) * 256 + ord($s[1]) - 65536; $map = [