Page MenuHomePhabricator

Update legacy calls to Database::sourceFile
Closed, ResolvedPublic

Description

Several part of the code pass false and not null to sourceFile.

For example, in includes/installer/DatabaseUpdater.php, we've:

Sample of code to update
public function copyFile( $filename ) {
    $this->db->sourceFile( $filename, false, false, false, 
        [ $this, 'appendLine' ]
    );
}
New signature of Database::sourceFile method
public function sourceFile(
    $filename,
    callable $lineCallback = null,
    callable $resultCallback = null,
    $fname = false,
    callable $inputCallback = null
);

Event Timeline

Change 314634 had a related patch set uploaded (by Reedy):
Replace false with null for sourceFile() call

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

Change 314635 had a related patch set uploaded (by Reedy):
Replace false for null in sourceFile() call

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

Change 314635 merged by jenkins-bot:
Replace false for null in sourceFile() call

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

Change 314634 merged by jenkins-bot:
Replace false with null for sourceFile() call

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

Dereckson closed this task as Resolved.EditedOct 9 2016, 1:08 AM

These two patches fixed the two places the occurence have been found. Other calls don't use optional parameters.

A search in the extensions I've checked out didn't found any more case.