announce warn return err when has event

This commit is contained in:
xiaomlove
2023-09-15 03:37:33 +08:00
parent 1cd26f9863
commit 1e700e6200

View File

@@ -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) {