summaryrefslogtreecommitdiff
path: root/lib/environment.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-05-06 17:42:03 +0200
committerChristoph Helma <helma@in-silico.ch>2010-05-06 17:42:03 +0200
commitd262dbc79c9f5d8e2d74647df52a9c44e1af511d (patch)
treeaa92dcec7e3f0302dbc106ad0ae48be3dd3ba967 /lib/environment.rb
parent8439bb9b337bded4a54018c03500a15082bce6b0 (diff)
martins modifications merged and adjusted
Diffstat (limited to 'lib/environment.rb')
-rw-r--r--lib/environment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/environment.rb b/lib/environment.rb
index b46bf19..29dcbdb 100644
--- a/lib/environment.rb
+++ b/lib/environment.rb
@@ -46,7 +46,7 @@ before {$sinatra = self unless $sinatra}
class Sinatra::Base
# overwriting halt to log halts (!= 202)
def halt(*response)
- LOGGER.error "halt "+response.first.to_s+" "+(response.size>1 ? response[1].to_s : "") if response.first >= 300
+ LOGGER.error "halt "+response.first.to_s+" "+(response.size>1 ? response[1].to_s : "") if response and response.first and response.first >= 300
# orig sinatra code:
response = response.first if response.length == 1
throw :halt, response