3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Don't require $log->field_farm_geofield to be present when populating geometry. It isn't always going to be, and it doesn't need to be before populating.

This commit is contained in:
Michael Stenta 2016-10-22 12:15:37 -04:00
parent 5ccc35f7f2
commit b4422d8fce

View file

@ -111,8 +111,8 @@ function farm_log_entity_presave($entity, $type) {
*/
function farm_log_geometry_populate(&$log, $area_field = 'field_farm_area') {
// If the log doesn't have an area reference field, or a geofield, bail.
if (!isset($log->{$area_field}) || !isset($log->field_farm_geofield)) {
// If the log doesn't have an area reference field, bail.
if (!isset($log->{$area_field})) {
return;
}