summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-23 23:35:25 +0000
committerSteven Barth <steven@midlink.org>2008-06-23 23:35:25 +0000
commit1a9fe9cd77e70674270101c9566efea6fd7c11bb (patch)
treea0d9565c80d2eac60a184986fff2083c93e56e91 /libs/web/luasrc
parentcd0eaf00057695e74c528757d0209a5d845a2c1b (diff)
libs/web: Fixed bug where the environment table gets returned in case of an undefined variable
Diffstat (limited to 'libs/web/luasrc')
-rw-r--r--libs/web/luasrc/http.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/web/luasrc/http.lua b/libs/web/luasrc/http.lua
index 5263bfaad1..bb05c680b1 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)