Last modified: 2012-06-05 23:11:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T39122, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37122 - [SWL] [Patch] 0.1; User preferences notice on -> Undefined variable: type / Undefined variable: name in SemanticWatchlist.hooks.php
[SWL] [Patch] 0.1; User preferences notice on -> Undefined variable: type / ...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticWatchlist (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 23:51 UTC by MWJames
Modified: 2012-06-05 23:11 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
just three lines (437 bytes, application/octet-stream)
2012-05-25 23:51 UTC, MWJames
Details

Description MWJames 2012-05-25 23:51:24 UTC
Created attachment 10655 [details]
just three lines

Error message

Undefined variable: type in ...\extensions\SemanticWatchlist\SemanticWatchlist.hooks.php on line  164

Undefined variable: name in ...\extensions\SemanticWatchlist\SemanticWatchlist.hooks.php on line 170

Problem analysis

Defining a group neither specifying namespace, concept or category creates a problem in SemanticWatchlist.hooks.php because of a missing variable definition (switch in line 137 defines $type and $name only for namespace, concept or category).

Solution

An easy way out is that in those cases where no (namespace, concept or category) is found the switch falls back to a default and assumes that properties are watched in namespace main ->  wfMsg( 'main' ).
Comment 1 Jeroen De Dauw 2012-05-27 15:14:06 UTC
Thanks for figuring this out. I went with a slightly different fix, but it should solve your problem. :)

Gerrit change #9019
Comment 2 MWJames 2012-06-05 23:11:28 UTC
Changes have been applied, therefore I close this one.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links