Skip to content
Browse files

Only log if theres a logger

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent fbf41c7 commit 75d98db73d053641d24a7356345766b0a7659de0 @dhh dhh committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/lib/active_record/fixtures.rb
View
4 activerecord/lib/active_record/fixtures.rb
@@ -853,7 +853,9 @@ def try_to_load_dependency(file_name)
# Let's warn in case this is a subdependency, otherwise
# subdependency error messages are totally cryptic
- ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}")
+ if ActiveRecord::Base.logger
+ ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}")
+ end
end
def require_fixture_classes(table_names = nil)

0 comments on commit 75d98db

Please sign in to comment.
Something went wrong with that request. Please try again.