From 1d808103c58253e2de4552d7d2dcebbae6c4e5ad Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 2 Jan 2011 08:25:05 +0000 Subject: [PATCH] Explicitally define $duplicates = array(); Also changed undefined $row for $rows --- includes/installer/MysqlUpdater.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/installer/MysqlUpdater.php b/includes/installer/MysqlUpdater.php index 35154f734d..12c14f6c08 100644 --- a/includes/installer/MysqlUpdater.php +++ b/includes/installer/MysqlUpdater.php @@ -311,6 +311,7 @@ class MysqlUpdater extends DatabaseUpdater { $this->output( wfTimestamp( TS_DB ) ); $this->output( "......Found duplicate entries\n" ); $this->output( sprintf( " %-60s %3s %5s\n", 'Title', 'NS', 'Count' ) ); + $duplicate = array(); foreach ( $rows as $row ) { if ( ! isset( $duplicate[$row->cur_namespace] ) ) { $duplicate[$row->cur_namespace] = array(); @@ -622,7 +623,7 @@ class MysqlUpdater extends DatabaseUpdater { $rows = $this->db->affectedRows(); if( $rows ) { - $this->output( "Set page_random to a random value on $row rows where it was set to 0\n" ); + $this->output( "Set page_random to a random value on $rows rows where it was set to 0\n" ); } else { $this->output( "...no page_random rows needed to be set\n" ); } -- 2.20.1