Closed (outdated)
Project:
Location
Version:
6.x-3.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2007 at 12:35 UTC
Updated:
20 Jul 2016 at 05:46 UTC
Jump to comment: Most recent
Hy,
I am getting the following error while accessing the location-geocoding settings admin/settings/location/geocoding
warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/guitarf/public_html/sites/all/modules/location/location.module on line 438.
Geocoding isn't working...
I'll try to figure it out, if someone finds a solution, I will be thankfull to hear it :)
Tom
Comments
Comment #1
twom commentedI did a quick fix by manually including the geocoding/google.inc file
foreach (variable_get('location_general_geocoders_in_use', array()) as $geocoder) {
include_once LOCATION_PATH. '/geocoding/'. $geocoder .'.inc';
}
to just
include_once LOCATION_PATH. '/geocoding/google.inc';
Comment #2
ankur commentedHey Tom,
I tried to run some debug statements to see if the file was actually not getting loaded and if the array was actually NULL. I couldn't find anything wrong. Could you post back with the revision numbers you have at the top of each file for google.inc, location.module, and location.inc?
-Ankur
Comment #3
twom commentedHey Ankur,
these are the versions I use
// $Id: location.module,v 1.79.2.10 2007/08/02 01:57:25 ankur Exp $
// $Id: location.inc,v 1.45.2.7 2007/08/02 01:57:25 ankur Exp $
// $Id: google.inc,v 1.1.2.3 2007/08/02 05:28:08 ankur Exp $
regards,
Tom
Comment #4
ankur commentedI found the bug after taking another look at it. Apparently, the google.inc file never gets loaded if it hasn't been enabled to geocode for any country, which is a catch if that's what you're trying to do. I originally couldn't replicate the bug because I already had it enabled and later changed the code to not hard-code the loading of the google.inc file.
Anywyay, I've committed a fix. You can either run CVS update if you have a checkout of the DRUPAL-5 branch or you can just wait until the tarball gets automatically generated again.
-Ankur
Comment #5
ankur commentedComment #6
twom commentedthx :)
Comment #7
(not verified) commentedComment #8
mxtOps, I get the same error with last version (6.x-3.1) I've just installed:
How can this be fixed?
Thank you very much
Comment #9
mxtmmmm... I think I've understand the problem: the file google.inc downloaded via DRUSH is EMPTY!!!!!
I'll try now to sobstitute it with the one downloaded directly from module page (no drush)
MXT
Comment #10
mxtYes now it works: how it can be occurred?
Comment #11
legolasboClosing old D6 issues as D6 is end of life