diff --git a/admin.php b/admin.php index bb2ff53..5fcc940 100644 --- a/admin.php +++ b/admin.php @@ -2255,7 +2255,7 @@ async function adminSubmitCreateTicket() { } catch (e) { errEl.textContent = '创建失败: ' + e.message; } } -function escAdmHtml(s) { return (s||'').replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); } +function escAdmHtml(s) { return String(s??'').replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"'); } function adminProcessInlineMd(text) { let s = text; diff --git a/today_bonds.php b/today_bonds.php index 977dcec..d43a300 100644 --- a/today_bonds.php +++ b/today_bonds.php @@ -82,7 +82,7 @@ function getTodayBondData() { $income = $incomeData[$p] ?? 0; $net = $income - $spend; $totalSpend += $spend; $totalIncome += $income; - $rows[] = ['name' => $p, 'spend' => $spend, 'income' => $income, 'net' => $net]; + $rows[] = ['name' => (string)$p, 'spend' => $spend, 'income' => $income, 'net' => $net]; } usort($rows, fn($a,$b) => $b['net'] - $a['net']); return [