From: Steven Barth Date: Mon, 23 Jun 2008 23:35:25 +0000 (+0000) Subject: libs/web: Fixed bug where the environment table gets returned in case of an undefined... X-Git-Tag: 0.8.0~777 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1a9fe9cd77e70674270101c9566efea6fd7c11bb;p=oweals%2Fluci.git libs/web: Fixed bug where the environment table gets returned in case of an undefined variable --- diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua index 5263bfaad..bb05c680b 100644 --- a/libs/web/luasrc/http.lua +++ b/libs/web/luasrc/http.lua @@ -89,7 +89,11 @@ function Request.formvaluetable(self, prefix) end function Request.getenv(self, name) - return name and self.message.env[name] or self.message.env + if name then + return self.message.env[name] + else + return self.message.env + end end function Request.setfilehandler(self, callback)