Skip to content

Commit

Permalink
check that uri is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Mar 18, 2011
1 parent f297abe commit a0485b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/em-http/http_encoding.rb
Expand Up @@ -63,7 +63,7 @@ def encode_query(uri, query)
query.to_s
end

if !uri.query.to_s.empty?
if uri && !uri.query.to_s.empty?
encoded_query = [encoded_query, uri.query].reject {|part| part.empty?}.join("&")
end
encoded_query.to_s.empty? ? uri.path : "#{uri.path}?#{encoded_query}"
Expand Down

0 comments on commit a0485b5

Please sign in to comment.