From 581c5febfc2c5c984e73a0445ff69e0256ce73d6 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 13 Oct 2010 22:35:27 +0000 Subject: [PATCH] Assignment in loop conditions suck while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in config --- config/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Installer.php b/config/Installer.php index 165740d17b..56323fc55c 100644 --- a/config/Installer.php +++ b/config/Installer.php @@ -1249,7 +1249,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) { if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) { $res = $wgDatabase->query( 'SHOW ENGINES' ); $found = false; - while ( $row = $wgDatabase->fetchObject( $res ) ) { + foreach ( $res as $row ) { if ( $row->Engine == $conf->DBengine && ( $row->Support == 'YES' || $row->Support == 'DEFAULT' ) ) { $found = true; break; -- 2.20.1