The URL wasn't loading when the database is used (interwiki cache works). "PHP Notice...
authorRobin Pepermans <robin@users.mediawiki.org>
Tue, 29 Nov 2011 16:48:37 +0000 (16:48 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Tue, 29 Nov 2011 16:48:37 +0000 (16:48 +0000)
This reverts r97806. It took me some time to find out, but r96475 accidentally backported the change from $row->iw_url to $row['iw_url'] (etc) to 1.18, which was fixed in r97789. That revision was merged to trunk, which shouldn't have been done either. I.e. until 1.18 it is an object, from 1.19 it is an array.

includes/api/ApiQuerySiteinfo.php

index c8a53fa..e2580ac 100644 (file)
@@ -292,12 +292,12 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                        if ( isset( $langNames[$prefix] ) ) {
                                $val['language'] = $langNames[$prefix];
                        }
-                       $val['url'] = wfExpandUrl( $row->iw_url, PROTO_CURRENT );
-                       if( isset( $row->iw_wikiid ) ) {
-                               $val['wikiid'] = $row->iw_wikiid;
+                       $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
+                       if( isset( $row['iw_wikiid'] ) ) {
+                               $val['wikiid'] = $row['iw_wikiid'];
                        }
-                       if( isset( $row->iw_api ) ) {
-                               $val['api'] = $row->iw_api;
+                       if( isset( $row['iw_api'] ) ) {
+                               $val['api'] = $row['iw_api'];
                        }
 
                        $data[] = $val;