https://bugzilla.wikimedia.org/show_bug.cgi?id=29547
Web browser: ---
Bug #: 29547
Summary: talk page an $wgArticle=null
Product: MediaWiki
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: Vector Skin
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Hello,
I have some problem with the Vector skin when I use the 'userCan' hook to
prevent some category of users from reading some talk pages. Output is :
:Fatal error: Call to a member function isCurrent() on a non-object in
.../skins/Vector.php on line 143
I tried to trace the problem trough the files of MediaWiki.
In index.php, there is a call $mediaWiki->performRequestForTitle to init
everything, including $wgArticle which is null at this point.
In includes/Wiki.php
* MediaWiki::performRequestForTitle : we do the preliminaryChecks
* MediaWiki::preliminaryChecks : if user can't read, do the final cleanup
($wgArticle is still null)
* MediaWiki::finalCleanup : output the page ($wgArticle is still null)
...a long list of function calls here...
At line 143 of Vector.php :
:if ( ( $isTalk && $wgArticle->isCurrent() ) || ( $wgOut->showNewSectionLink()
) ) {
We assume that $wgArticle is not null. I think that adding a condition
"isset($wgArticle)" would solve the problem.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l