Page MenuHomePhabricator

Argument 1 passed to FlaggedRevsUIHooks::addHideReviewedFilter() must be an instance of ChangesListSpecialPage, instance of SpecialNewpages given on 1.29
Closed, ResolvedPublic

Description

When visiting Special:NewPages I get a php error.

[5f47fa823a03c5f38d0c6880] /wiki/Special:NewPages TypeError from line 287 of /var/www/html/extensions/FlaggedRevs/frontend/FlaggedRevsUI.hooks.php: Argument 1 passed to FlaggedRevsUIHooks::addHideReviewedFilter() must be an instance of ChangesListSpecialPage, instance of SpecialNewpages given, called in /var/www/html/includes/Hooks.php on line 186

Backtrace:

#0 /var/www/html/includes/Hooks.php(186): FlaggedRevsUIHooks::addHideReviewedFilter(SpecialNewpages, array)
#1 /var/www/html/includes/specials/SpecialNewpages.php(61): Hooks::run(string, array)
#2 /var/www/html/includes/specials/SpecialNewpages.php(130): SpecialNewpages->setup(NULL)
#3 /var/www/html/includes/specialpage/SpecialPage.php(522): SpecialNewpages->execute(NULL)
#4 /var/www/html/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#5 /var/www/html/includes/MediaWiki.php(287): SpecialPageFactory::executePath(Title, RequestContext)
#6 /var/www/html/includes/MediaWiki.php(862): MediaWiki->performRequest()
#7 /var/www/html/includes/MediaWiki.php(523): MediaWiki->main()
#8 /var/www/html/index.php(43): MediaWiki->run()
#9 {main}

https://testwiki.wiki/wiki/Special:NewPages

To reproduce install php 7.1 and mediawiki 1.29.1 and FlaggedRevs on REL1_29 branch.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 14 2017, 6:11 PM

Why do you think this is related to PHP 7.1?

Not sure what else it could be, and that is what my wiki is using.

Feel free to remove if you think that its not the cause.

It seems a lot more like a FlaggedRevs bug in the 1,29 branch.

Legoktm renamed this task from PHP 7.1 issues to Argument 1 passed to FlaggedRevsUIHooks::addHideReviewedFilter() must be an instance of ChangesListSpecialPage, instance of SpecialNewpages given on 1.29.Nov 14 2017, 7:14 PM
Legoktm removed a project: [DO NOT USE] NewPHP.
Legoktm updated the task description. (Show Details)

None. If there were updates, they'd be listed here.

Restricted Application added a project: User-MacFan4000. · View Herald TranscriptJan 6 2018, 2:52 AM
Krinkle closed this task as Resolved.Oct 27 2018, 7:04 PM
Krinkle added a subscriber: Krinkle.

Looking through all of Wikimedia Git and beyond as indexed by Codesearch, the ChangesListSpecialPageStructuredFilters hook is only ever fired from includes/specialpage/ChangesListSpecialPage.php, not by SpecialNewpages nor any sub or parent class.