r108676 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108675‎ | r108676 | r108677 >
Date:20:32, 11 January 2012
Author:maxsem
Status:ok
Tags:
Comment:
Don't output stuff when it's null, i.e. no "paramname": null
Modified paths:
  • /trunk/extensions/GeoData/ApiQueryCoordinates.php (modified) (history)
  • /trunk/extensions/GeoData/ApiQueryGeoSearch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GeoData/ApiQueryCoordinates.php
@@ -57,7 +57,7 @@
5858 $vals['primary'] = '';
5959 }
6060 foreach( $params['prop'] as $prop ) {
61 - if ( isset( Coord::$fieldMapping[$prop] ) ) {
 61+ if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->$field ) ) {
6262 $field = Coord::$fieldMapping[$prop];
6363 $vals[$prop] = $row->$field;
6464 }
Index: trunk/extensions/GeoData/ApiQueryGeoSearch.php
@@ -110,7 +110,7 @@
111111 $vals['primary'] = '';
112112 }
113113 foreach( $params['prop'] as $prop ) {
114 - if ( isset( Coord::$fieldMapping[$prop] ) ) {
 114+ if ( isset( Coord::$fieldMapping[$prop] ) && isset( $row->$field ) ) {
115115 $field = Coord::$fieldMapping[$prop];
116116 $vals[$prop] = $row->$field;
117117 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r109812Follow-up r108676: fix undefined variable noticesmaxsem10:49, 23 January 2012

Status & tagging log