From 0b5acd06234cbed913ccb9b41dc95464ed3d9f30 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Mon, 25 Nov 2013 22:08:23 -0500 Subject: [PATCH] Move reference to $row where it is in-scope and doesn't produce E_STRICT notices. Bug: 57575 Change-Id: Ic508ebbb0816acd32be355b5f19b46637d58c36a --- maintenance/updateCollation.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 964b3138d7..7ca04b4134 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -47,7 +47,7 @@ class UpdateCollation extends Maintenance { $this->mDescription = <<getBatchCondition( $row, $dbw ) ); + } } if ( !$dryRun ) { $dbw->commit( __METHOD__ ); } - if ( $row ) { - $batchConds = array( $this->getBatchCondition( $row ) ); - } - $count += $res->numRows(); $this->output( "$count done.\n" ); @@ -219,8 +218,7 @@ TEXT; * Return an SQL expression selecting rows which sort above the given row, * assuming an ordering of cl_to, cl_type, cl_from */ - function getBatchCondition( $row ) { - $dbw = $this->getDB( DB_MASTER ); + function getBatchCondition( $row, $dbw ) { $fields = array( 'cl_to', 'cl_type', 'cl_from' ); $first = true; $cond = false; -- 2.20.1