diff --git a/sinatra-contrib/lib/sinatra/required_params.rb b/sinatra-contrib/lib/sinatra/required_params.rb index 53833418..c14525e4 100644 --- a/sinatra-contrib/lib/sinatra/required_params.rb +++ b/sinatra-contrib/lib/sinatra/required_params.rb @@ -60,7 +60,7 @@ module Sinatra elsif key.is_a?(Array) _required_params(p, *key) else - halt 400 unless p.has_key?(key.to_s) + halt 400 unless p && p.respond_to?(:has_key?) && p.has_key?(key.to_s) end end true