mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
header: fix runtime error when query_string is null
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
@@ -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