summaryrefslogtreecommitdiff
path: root/misc/freeswitch/scripts/common
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-23 11:34:04 +0100
committerspag <spag@golwen.net>2013-01-23 11:34:04 +0100
commit2e95e18594226283956a298999ad5b00bab13a34 (patch)
tree4cb15cf20f012a65682c2b51c8731ec230335d76 /misc/freeswitch/scripts/common
parentd14b99c32f0c6a88298c9bed1d91b7fec0fb04b5 (diff)
exit on unsupported types
Diffstat (limited to 'misc/freeswitch/scripts/common')
-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)