Skip to content
This repository
Browse code

Fixed bug 6440 by checking that destroy exists on the session

  • Loading branch information...
commit 8ca8ac379d8a2d10f39fdef67db545732fe95309 1 parent 589ce09
Rob Di Marco authored February 28, 2011
4  actionpack/lib/action_controller/request.rb
@@ -446,7 +446,9 @@ def session=(session) #:nodoc:
446 446
     end
447 447
 
448 448
     def reset_session
449  
-      session.destroy if session
  449
+      # session may be a hash, if so, we do not want to call destroy
  450
+      # fixes issue 6440
  451
+      session.destroy if session and session.respond_to?(:destroy)
450 452
       self.session = {}
451 453
     end
452 454
 

0 notes on commit 8ca8ac3

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