From 15f06ea8c25b9570bb86a1b1b06ffe3d598b5710 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 26 Apr 2007 01:08:07 +0000 Subject: XML values can be nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index a8f2ec4452..e4103f1cb7 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -173,7 +173,7 @@ module ActiveSupport #:nodoc: # Turn { :files => { :file => # } into { :files => # } so it is compatible with # how multipart uploaded files from HTML appear - if xml_value["file"].is_a?(StringIO) + if xml_value && xml_value["file"].is_a?(StringIO) xml_value["file"] else xml_value -- cgit v1.2.3