Item13944: Foswiki::Func::addToHEAD (deprecated in 2010) breaks with Foswiki 2.1 Zones rewrite.
Priority: Urgent
Current State: Closed
Released In: 2.1.1
Target Release: patch
Here is the patch:
diff --git a/core/lib/Foswiki/Func.pm b/core/lib/Foswiki/Func.pm
index 3e43aed..851ce6b 100644
--- a/core/lib/Foswiki/Func.pm
+++ b/core/lib/Foswiki/Func.pm
@@ -3802,7 +3802,9 @@ See Foswiki:Development/UpdatingExtensionsScriptZone for more details.
=cut
sub addToHEAD {
- $Foswiki::Plugins::SESSION->addToZone( 'head', @_ );
+ my $session = $Foswiki::Plugins::SESSION;
+ ASSERT($session) if DEBUG;
+ $session->zones()->addToZone('head', @_);
}
=begin TML
--
GeorgeClark - 04 Feb 2016