From 2447469ea09324932ad60ad9aab8ec16a7b7f273 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 17 Sep 2025 04:41:48 +0700 Subject: [PATCH] fix shoutbox not login warning --- public/shoutbox.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/shoutbox.php b/public/shoutbox.php index 5f44a194..832a5b41 100644 --- a/public/shoutbox.php +++ b/public/shoutbox.php @@ -100,14 +100,14 @@ else } } -$limit = ($CURUSER['sbnum'] ? $CURUSER['sbnum'] : 70); +$limit = ($CURUSER['sbnum'] ?? 70); if ($where == "helpbox" && $showhelpbox_main == 'yes') { //request helpbox, not require login $sql = "SELECT * FROM shoutbox WHERE type='hb' ORDER BY date DESC LIMIT ".$limit; -} elseif ($where == "shoutbox" && $CURUSER && ($CURUSER['hidehb'] == 'yes' || $showhelpbox_main != 'yes')) { +} elseif ($where == "shoutbox" && isset($CURUSER) && ($CURUSER['hidehb'] == 'yes' || $showhelpbox_main != 'yes')) { //request shoutbox, exclude helpbox content, require login $sql = "SELECT * FROM shoutbox WHERE type='sb' ORDER BY date DESC LIMIT ".$limit; -} elseif ($CURUSER) { +} elseif (isset($CURUSER)) { $sql = "SELECT * FROM shoutbox ORDER BY date DESC LIMIT ".$limit; } else { die("

".$lang_shoutbox['std_access_denied']."

"."

".$lang_shoutbox['std_access_denied_note']."

");