--- drupal_clefs/drupal-5.3/modules/geonames/geonames.module 2007-12-11 19:55:21.000000000 +0100 +++ drupal-5.3/modules/geonames/geonames.module 2007-12-11 19:55:25.000000000 +0100 @@ -418,7 +418,7 @@ } $xml = new SimpleXMLElement($data); - if ($xml->status) { + if (isset($xml) && is_array($xml->status)) { $result->status['message'] = (string) $xml->status['message']; $result->status['value'] = (string) $xml->status['value']; } @@ -437,8 +437,8 @@ $field_template = array_keys($fields); } // build a list of all the attributes in the entry - foreach ($entry->children() as $field) { - $fieldname = strtolower($field->getName()); + foreach ($entry->children() as $key=>$field) { + $fieldname = strtolower($key); $field_actual[$fieldname] = ''; // TODO!! Either in_array or $[]... "search" needs in_array... if ((!$columns) || in_array($fieldname, $columns) || $fieldname = 'timezone') {