Closed (fixed)
Project:
GeoNames
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Anonymous (not verified)
Created:
4 Jun 2008 at 09:46 UTC
Updated:
24 Apr 2018 at 13:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
2xe commentedI actually fixed that for D6 last week, but haven't had time to commit yet;
< if (!$result && !$data) {
< $data = file_get_contents(geonames_service_url($service) . $querystring . '&app=drupal');
< if ($data == FALSE) {
---
> if (!$result && !$data) {
> $request = drupal_http_request(geonames_service_url($service) . $querystring . '&app=drupal');
> $data = $request->data;
> if (empty($data)) {
Those lines are probably the same in D5.
Sero
// Ah.. missed a few lines, rewritten to work for now -- will do it properly later...
Comment #2
Anonymous (not verified) commentedYup, these are the same lines as in D5.
Be aware that the original $data variable is used a couple of times in that function. I decided to assign the result of the drupal_http_request() call to the existing $data variable to avoid problems.
Also, your empty() call should not have a "!".
BTW: this is tricky code to test because you only get there when caching is disabled.
Attached is my patch against HEAD, which should be straightforward to apply to D5 as well. The code works for me.
Comment #3
2xe commentedFixed in Drupal 6 current official stable release.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
ayalon commentedWhy is this fix not in the latest 6.x dev version? Is it lost somewhere?