From 1e700e6200879d68eba06f3da92d9b28adb9564a Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 15 Sep 2023 03:37:33 +0800 Subject: [PATCH] announce warn return err when has event --- include/functions_announce.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/functions_announce.php b/include/functions_announce.php index dd63e5b1..1aa18c72 100644 --- a/include/functions_announce.php +++ b/include/functions_announce.php @@ -81,6 +81,10 @@ function err($msg) */ function warn($msg, int $interval = 7200) { + if (!empty($GLOBALS['event'])) { + //force return err, otherwise event will be lost in the next announce request + return err($msg); + } $d = get_resp_dict_from_global(); $d['warning message'] = $msg; if ($interval > 0) {