Possible fix for attempt to index a string value

This commit is contained in:
Matteo Biscosi 2024-04-11 06:04:27 -04:00
parent 785ac74633
commit 8076ddc67f

View file

@ -1526,7 +1526,7 @@ end
function addBytesInfoToAlertDescr(msg, value, json_format)
if json_format then
if isEmptyString(msg) then
if type(msg) == "string" then
msg = {}
end
msg["server_traffic"] = value["srv2cli_bytes"] or 0