From 6c23e5e15f0340c7e9b9bf1134ca1dbaf30aac45 Mon Sep 17 00:00:00 2001 From: Vadim Belman Date: Mon, 14 Mar 2016 20:55:33 -0400 Subject: [PATCH] Item13897: Bug fix --- UnitTestContrib/test/unit/FoswikiTestCase.pm | 1 + core/lib/Foswiki.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/UnitTestContrib/test/unit/FoswikiTestCase.pm b/UnitTestContrib/test/unit/FoswikiTestCase.pm index 80882b08be..f4ee5f36fa 100644 --- a/UnitTestContrib/test/unit/FoswikiTestCase.pm +++ b/UnitTestContrib/test/unit/FoswikiTestCase.pm @@ -1080,6 +1080,7 @@ sub finishFoswikiSession { #use Devel::Refcount; #say STDERR "session refcount: ", Devel::Refcount::refcount($this->session); $this->clear_session; + undef $Foswiki::Plugins::SESSION if $Foswiki::Plugins::SESSION; ASSERT( !$Foswiki::Plugins::SESSION ) if SINGLE_SINGLETONS; return; diff --git a/core/lib/Foswiki.pm b/core/lib/Foswiki.pm index 84c034deb0..f0a98b17ef 100644 --- a/core/lib/Foswiki.pm +++ b/core/lib/Foswiki.pm @@ -2685,6 +2685,7 @@ sub DEMOLISH { $this->clear_plugins; $this->clear_forms; if ( $this == $Foswiki::Plugins::SESSION ) { + #say STDERR $this, " Here we clear the old Plugins::SESSION"; undef $Foswiki::Plugins::SESSION; }