Page MenuHomePhabricator

Cannot access property on non-object in MoveLeadParagraphTransform
Closed, ResolvedPublic2 Estimated Story Points

Description

There are a small number of errors (severity 3, level NOTICE) reported in Logstash for:

Cannot access property on non-object in /srv/mediawiki/php-1.31.0-wmf.17/extensions/MobileFrontend/includes/transforms/MoveLeadParagraphTransform.php on line 110

This is likely due to recent changes to the lead paragraph transform.

Given the security level is notice it is not possible to provide URLs where this occurs, but given it's a notice, it's unlikely to be causing any user visible error.

A unit test is very easy to write - $infobox can resolve to false per getInfoboxContainer

Testing steps

  • Post SWAT deploy, the error should not appear in the logs.

Event Timeline

ovasileva moved this task from Incoming to 2017-18 Q2 on the Web-Team-Backlog board.
ovasileva lowered the priority of this task from High to Medium.Jan 17 2018, 5:16 PM
Jdlrobson set the point value for this task to 2.

I'll flesh out the task with details of impacted pages and result to end user.

Change 404774 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Avoid notice in lead paragraph transform when encounter infobox like elements

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

Change 404774 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Avoid notice in lead paragraph transform when encounter infobox like elements

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

Ok this has been SWATTED.
The error rate is trailing, but I'd appreciate someone (nominating @Niedzielski for time being) taking a look tomorrow @ this url to see if the errors are gone completely from a 24 hr period. If so please resolve!

Since this is a regression, should this task have a parent?

Being bold I'm assuming that it's T170006

No errors in the last few hours. I'll check again later today.