When using interwiki data from the database the value for iw_wikiid and
iw_api maybe empty strings, because the database does not allow NULL
here.
Suppress the output of the attribute in that case, because there are not
useful.
This should not break clients, because using .cdb (like WMF wikis)
already missing these attributes in the result.
Change-Id: I60b97b4b58fdeaf699951544d418e5dc06e3830a
if ( substr( $row['iw_url'], 0, 2 ) == '//' ) {
$val['protorel'] = '';
}
- if ( isset( $row['iw_wikiid'] ) ) {
+ if ( isset( $row['iw_wikiid'] ) && $row['iw_wikiid'] !== '' ) {
$val['wikiid'] = $row['iw_wikiid'];
}
- if ( isset( $row['iw_api'] ) ) {
+ if ( isset( $row['iw_api'] ) && $row['iw_api'] !== '' ) {
$val['api'] = $row['iw_api'];
}