Closed (fixed)
Project:
GeoNames
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
9 Dec 2009 at 12:30 UTC
Updated:
23 Dec 2009 at 12:40 UTC
Jump to comment: Most recent file
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