Item11572: Fatal syntax error in source

Priority: Urgent
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: NotificationPlugin
Reported By: AlexisHazell
Waiting For:
Last Change By: GeorgeClark
Adding the NTF macro to a topic causes a fatal error, with the following message sent to the browser:

Can't use string ("name") as a HASH ref while "strict refs" in use at [redacted]/foswiki/lib/Foswiki/ line 1034.
at [redacted]/foswiki/lib/Foswiki/ line 1034
Foswiki::Meta::put('Foswiki::Meta=HASH(0x5493d30)', 'TOPICPARENT', 'name', 'undef') called at [redacted]/foswiki/lib/Foswiki/Plugins/ line 305

Line 305 of is:

$tmpMeta->put( "TOPICPARENT", ( "name" => $who ) );

is an instance of Foswiki::Meta. However, as per, the 'put' method expects to receive a hashref as its second argument. The error can thus be fixed by replacing the above line with:

$tmpMeta->put( "TOPICPARENT", { "name" => $who } );

Fixed in NotificationPlugin 2.0

-- GeorgeClark - 30 Apr 2017
Topic revision: r2 - 30 Apr 2017, GeorgeClark - This page was cached on 10 Jun 2017 - 00:30.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License