mirror of
https://github.com/pi-hole/web.git
synced 2026-10-11 10:14:44 +01:00
header: fix runtime error when query_string is null
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
1 parent
1b24b1dcf7
commit
27b7aaa713
1 file changed
+4
@@ -25,6 +25,10 @@ end
|
||||
|
||||
-- Function returning GET parameter value (or nil if not set)
|
||||
function GET(name)
|
||||
if not mg.request_info.query_string then
|
||||
return nil
|
||||
end
|
||||
|
||||
return mg.request_info.query_string:match(name.."=([^&]*)")
|
||||
-- mg.get_var(mg.request_info.query_string, "REQUEST_URI")
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user