Fix up r45897: indexInfo() returns an array of objects rather than an object
authorRoan Kattouw <catrope@users.mediawiki.org>
Tue, 20 Jan 2009 13:13:55 +0000 (13:13 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Tue, 20 Jan 2009 13:13:55 +0000 (13:13 +0000)
maintenance/updaters.inc

index cbdcbc8..2de6ac6 100644 (file)
@@ -1269,7 +1269,7 @@ function sqlite_initial_indexes() {
 function do_unique_pl_tl_il() {
        global $wgDatabase;
        $info = $wgDatabase->indexInfo( 'pagelinks', 'pl_namespace' );
-       if( !$info->Non_unique ) {
+       if( is_array($info) && !$info[0]->Non_unique ) {
                echo "...pl_namespace, tl_namespace, il_to indices are already UNIQUE.\n";
        } else {
                echo "Making pl_namespace, tl_namespace and il_to indices UNIQUE... ";