Item14615: XMLStoreContrib uses forbidden perl syntax.
Priority: Urgent
Current State: Waiting for Release
Released In: n/a
Target Release:
Foswiki::Plugins::PlantUMLPlugin could not be loaded. Errors were:
Experimental keys on scalar is now forbidden at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227.
at /srv/www/foswiki/htdocs/lib/Foswiki/Contrib/XMLStoreContrib.pm line 227.
--
GeorgeClark - 02 Feb 2018
The following patch is reported as fixing the issue. See Support.Question1923.
diff --git a/lib/Foswiki/Contrib/XMLStoreContrib.pm b/lib/Foswiki/Contrib/XMLStoreContrib.pm
index 329d265..65e12c9 100644
--- a/lib/Foswiki/Contrib/XMLStoreContrib.pm
+++ b/lib/Foswiki/Contrib/XMLStoreContrib.pm
@@ -224,8 +224,8 @@ sub save {
# Remove all nodes associated with the updated topic from the most
# recent document, then add the possibly changed nodes back in.
my $diskroot = $doc->documentElement();
- foreach my $web (sort keys $self->{'updated'}) {
- foreach my $topic (sort keys $self->{'updated'}->{$web}) {
+ foreach my $web (sort keys %{ $self->{'updated'} }) {
+ foreach my $topic (sort keys %{ $self->{'updated'}->{$web} }) {
my @nodes = $doc->findnodes(
"/" . $self->{'rootname'} . "/" . $self->{'nodename'} .
"[\@web='$web' and \@topic='$topic']");
--
GeorgeClark - 02 Feb 2018