diff options
author | spag <spag@golwen.net> | 2013-01-23 11:34:04 +0100 |
---|---|---|
committer | spag <spag@golwen.net> | 2013-01-23 11:34:04 +0100 |
commit | 2e95e18594226283956a298999ad5b00bab13a34 (patch) | |
tree | 4cb15cf20f012a65682c2b51c8731ec230335d76 | |
parent | d14b99c32f0c6a88298c9bed1d91b7fec0fb04b5 (diff) |
exit on unsupported types
-rw-r--r-- | misc/freeswitch/scripts/common/str.lua | 4 |
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) |