Hi,

Using feedapi with simplepie to make feed-items with geocoordinaties (latitude, longtitude). I got the following error:

PHP Fatal error: Unsupported operand types in httpdocs/sites/all/modules/location/location.module on line 1330, referer: http://www.example.nl/node/12050/map

Line 1330 of location says:
// Normalize coordinates.
while ($location['latitude'] > 90) {
$location['latitude'] -= 180; <= Line 1330
}
while ($location['latitude'] < -90) {
$location['latitude'] += 180;
}
while ($location['longitude'] > 180) {
$location['longitude'] -= 360;
}
while ($location['longitude'] < -180) {
$location['longitude'] += 360;
}

Can someone help me to correct this error please?

Thanks a lot in advance!
greetings,
Martijn

Comments

summit’s picture

Could this be related to having arrays but into $location:
See remark on:http://agaric.com/note/unsupported-operand-types-messaging-module-fatal-...

Which looks truly wrong. Can arrays really use the += operator? I think not: http://us.php.net/manual/en/language.operators.assignment.php

Any solution for this using arrays?

EDIT: I think this is an error in location when you set: $node->{$field_name}[$i]['inhibit_geocode'] = true;
Then the function in which 'inhibit_geocode' is asked for is triggered but a wrong {} is placed. Do not have time to explain further now..sorry.

yesct’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: +location compatibility with other modules

Please check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.

ankur’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of follow up. This issue might have been fixed since the original report.