summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/freeswitch/scripts/common/str.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/freeswitch/scripts/common/str.lua b/misc/freeswitch/scripts/common/str.lua
index 32f054e..793c191 100644
--- a/misc/freeswitch/scripts/common/str.lua
+++ b/misc/freeswitch/scripts/common/str.lua
@@ -5,6 +5,10 @@
module(...,package.seeall)
function try(array, arguments)
+ if type(arguments) ~= 'string' or type(array) ~= 'table' then
+ return nil;
+ end
+
local result = array;
arguments:gsub('([^%.]+)', function(entry)