Item12750: syntax error in JSTreeConnector.pm

pencil
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: ClassificationPlugin
Branches: trunk
Reported By: DanieleGondoni
Waiting For:
Last Change By: MichaelDaum
Browsing categories fails consistently giving out the following error

Type of arg 1 to keys must be hash (not hash element) at /var/lib/foswiki/lib/Foswiki/Plugins/ClassificationPlugin/JSTreeConnector.pm line 103, near "})" Compilation failed in require at /var/lib/foswiki/lib/Foswiki/Plugins/ClassificationPlugin.pm line 75.

I have implemented a fix changing the relevant line from

my $nrChildren = scalar(grep {!/^BottomCategory$/} keys $child->{children});

to

my $nrChildren = scalar(grep {!/^BottomCategory$/} keys %{$child->{children}});

-- DanieleGondoni - 13 Feb 2014

 
Topic revision: r3 - 18 Mar 2014, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy