From b21f24d9807bd161af947cf0f0cc440c9adffb73 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 10 Oct 2012 13:46:25 -0500 Subject: [PATCH] Ensure expires_in and created_at timestamps aren't nil when attempting to upgrade cache --- activesupport/lib/active_support/cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 690e5ce194..732ab4b7df 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -644,7 +644,7 @@ def convert_version_3_entry! @c = @compressed remove_instance_variable(:@compressed) end - if defined?(@expires_in) && defined?(@created_at) + if defined?(@expires_in) && defined?(@created_at) && @expires_in && @created_at @x = (@created_at + @expires_in).to_i remove_instance_variable(:@created_at) remove_instance_variable(:@expires_in) -- GitLab