mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-01 14:26:34 +00:00
Use local variables.
This commit is contained in:
@@ -77,8 +77,8 @@ function Database:connected(sql)
|
||||
return self._dbh and self._dbh:connected()
|
||||
end
|
||||
|
||||
function Database.__self_test__()
|
||||
local db = Database.new('system')
|
||||
function Database.__self_test__(name)
|
||||
local db = Database.new(name or 'system')
|
||||
assert(db:connected())
|
||||
|
||||
assert("1" == db:first_value("select 1 as v union all select 2 as v"))
|
||||
|
||||
Reference in New Issue
Block a user