Page MenuHomePhabricator

updateCollation refers to $row when it is out of scope
Closed, ResolvedPublic

Description

Today, while I was trying to enable profiling, I set
$wgProfileToDatabase = true;
and then ran
php maintenance/update.php
as suggested at [[mw:Manual:How_to_debug]]. I have error_reporting set to show E_STRICT and I noticed a few of the following:
Notice: Undefined variable: row in maintenance/updateCollation.php on line 192

The reference to $row is outside of the foreach loop where $row is set, so I would expect it to often (if not always) be unset.

I'm not sure if moving the reference to the inside of the foreach loop is the right fix, but it seems to work for me.


Version: unspecified
Severity: normal

Details

Reference
bz57575

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:18 AM
bzimport set Reference to bz57575.
bzimport added a subscriber: Unknown Object (MLST).

Change 97670 had a related patch set uploaded by MarkAHershberger:
Move reference to $row where it is in-scope and doesn't produce E_STRICT notices.

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

Change 97670 merged by MarkAHershberger:
Move reference to $row where it is in-scope and doesn't produce E_STRICT notices.

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