Page MenuHomePhabricator

Catchable fatal error: Argument 2 passed to RevisionSliderHooks::onDiffViewHeader() must be an instance of Revision, null given
Closed, ResolvedPublic

Description

Catchable fatal error: Argument 2 passed to RevisionSliderHooks::onDiffViewHeader() must be an instance of Revision, null given in /srv/mediawiki/php-1.30.0-wmf.4/includes/Hooks.php on line 186

Event Timeline

mmodell created this task.Jun 7 2017, 9:38 PM
Restricted Application added a project: TCB-Team. · View Herald TranscriptJun 7 2017, 9:38 PM
mmodell raised the priority of this task from Normal to High.Jun 7 2017, 9:43 PM
greg raised the priority of this task from High to Unbreak Now!.Jun 7 2017, 11:38 PM
greg added a subscriber: greg.

If blocking the train, UBN!

Restricted Application added subscribers: Jay8g, TerraCodes. · View Herald TranscriptJun 7 2017, 11:38 PM

Change 357748 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/RevisionSlider@master] Handle possible null $oldRev in DiffViewHeader hook handler

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

Change 357748 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@master] Handle possible null $oldRev in DiffViewHeader hook handler

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

Change 357802 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/RevisionSlider@wmf/1.30.0-wmf.4] Handle possible null $oldRev in DiffViewHeader hook handler

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

Change 357802 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@wmf/1.30.0-wmf.4] Handle possible null $oldRev in DiffViewHeader hook handler

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

Mentioned in SAL (#wikimedia-operations) [2017-06-08T13:47:25Z] <aude@tin> Synchronized php-1.30.0-wmf.4/extensions/RevisionSlider: Fix fatal error: T167359 (duration: 00m 44s)

demon added a subscriber: demon.Jun 8 2017, 7:42 PM

I'm still seeing this in production.

demon added a comment.Jun 8 2017, 10:22 PM

The fix above ^ won't fix this at all. The error is that the function is being *passed* a null value, not that a null value is being *used*

What you need to do here is adjust the function signature. Either drop the Revision type hints or set it to default null (Revision $r = null) to also allow null values.

demon added a comment.Jun 8 2017, 10:27 PM

On re-reading the patch, it looks like $newRev does this, $oldRev still doesn't. I'll get a patch up.

Change 357945 had a related patch set uploaded (by Chad; owner: Chad):
[mediawiki/extensions/RevisionSlider@master] Also drop Revision typehint from $oldRev

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

Change 357945 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@master] Also drop Revision typehint from $oldRev

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

Change 357946 had a related patch set uploaded (by Chad; owner: Chad):
[mediawiki/extensions/RevisionSlider@wmf/1.30.0-wmf.4] Also drop Revision typehint from $oldRev

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

Change 357946 merged by jenkins-bot:
[mediawiki/extensions/RevisionSlider@wmf/1.30.0-wmf.4] Also drop Revision typehint from $oldRev

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

demon closed this task as Resolved.Jun 8 2017, 10:57 PM
demon claimed this task.

Now it's fixed.

mmodell changed the subtype of this task from "Task" to "Production Error".Wed, Aug 28, 11:10 PM