Update languages.lua

Prevent a nill error when the phrase was not found.
This commit is contained in:
FusionPBX 2018-01-31 14:45:24 -07:00 committed by GitHub
parent 241377c09c
commit d877dd0652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -164,12 +164,14 @@
end
--set the cache
local ok, err = cache.set(language_cache_key, XML_STRING, expire["acl"]);
if debug["cache"] then
if ok then
freeswitch.consoleLog("notice", "[xml_handler] " .. language_cache_key .. " stored in the cache\n");
else
freeswitch.consoleLog("warning", "[xml_handler] " .. language_cache_key .. " can not be stored in the cache: " .. tostring(err) .. "\n");
if (XML_STRING) then
local ok, err = cache.set(language_cache_key, XML_STRING, expire["acl"]);
if debug["cache"] then
if ok then
freeswitch.consoleLog("notice", "[xml_handler] " .. language_cache_key .. " stored in the cache\n");
else
freeswitch.consoleLog("warning", "[xml_handler] " .. language_cache_key .. " can not be stored in the cache: " .. tostring(err) .. "\n");
end
end
end