When calling the "nearbypostalcodes" service, using the postcode+country+radius variant:
$query = array('postalcode' => 8775, 'country' => 'CH', 'radius' => 10);
$results = geonames_query('nearbypostalcodes', $query);
the following messages are emitted at Notice level:
Undefined index: lat Notice geonames.module 600 geonames_query_required_parameters_set() Undefined index: lng Notice geonames.module 600 geonames_query_required_parameters_set()
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | geonames.warning.patch | 895 bytes | lyricnz |
Comments
Comment #1
lyricnz commentedThe code in question is:
This should use array_key_exists() rather than checking for a non-false array value (consider a zero value!).
Comment #2
lyricnz commentedSee attached patch
Comment #3
lyricnz commentedFixed in http://drupal.org/cvs?commit=299890