Page MenuHomePhabricator

LogPage.php assumes that $wgLogActionsHandlers contains callbacks, but usually contains class names
Closed, ResolvedPublic

Description

$wgLogActionsHandlers normally contains class names, but on line 296, its treated as if it contained callbacks. This is normally not reached, unless $wgLogActions is not set.

I'm not sure if this is intentional as some sort of back compat thing. If it is, this should sanity check that the given value is_callable to prevent fatals. It would be nice if how that value is used was better documented.


Version: 1.22.0
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:00 AM
bzimport set Reference to bz52220.
bzimport added a subscriber: Unknown Object (MLST).

It used to have functions, but in the write I turned it into classes. If there is code which cannot handle both classes and callables, that is a bug.

(In reply to comment #1)

It used to have functions, but in the write I turned it into classes. If
there
is code which cannot handle both classes and callables, that is a bug.

There was someone on irc who was getting fatals because code was expecting callables. Its likely that this person's set up was very borked, but nonetheless.

Change 990371 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/core@master] Support dependency injection in log formatters

https://gerrit.wikimedia.org/r/990371

Change 990371 merged by jenkins-bot:

[mediawiki/core@master] Support dependency injection in log formatters

https://gerrit.wikimedia.org/r/990371

matmarex assigned this task to Tgr.
matmarex subscribed.

Change 992837 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Clarify breaking change release notes for $wgLogActionsHandlers

https://gerrit.wikimedia.org/r/992837

Change 992837 merged by jenkins-bot:

[mediawiki/core@master] Clarify breaking change release notes for $wgLogActionsHandlers

https://gerrit.wikimedia.org/r/992837