Skip to content

Commit 1f2b923

Browse files
committed
fix(parse_dsn) fatal string concat with nil error
1 parent 5e7accf commit 1f2b923

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/resty/redis/connector.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ local function parse_dsn(params)
150150

151151
local m, err = ngx_re_match(url, url_pattern, "oj")
152152
if not m then
153-
return nil, "could not parse DSN: " .. err
153+
return nil, "could not parse DSN: " .. tostring(err)
154154
end
155155

156156
local fields
@@ -175,6 +175,7 @@ local function parse_dsn(params)
175175

176176
return true, nil
177177
end
178+
_M.parse_dsn = parse_dsn
178179

179180

180181
function _M.connect(self, params)

0 commit comments

Comments
 (0)