#9952 Fixed count error

This commit is contained in:
Daniel Maya 2022-11-30 16:08:59 +01:00
parent 00c2d3347f
commit 8bbfabb891
1 changed files with 2 additions and 2 deletions

View File

@ -1100,7 +1100,7 @@ function gis_update_map(
}
if (array_key_exists('layer_agent_list', $layer)) {
if (count($layer['layer_agent_list']) > 0) {
if (empty($layer['layer_agent_list']) === false && count($layer['layer_agent_list']) > 0) {
foreach ($layer['layer_agent_list'] as $agent) {
$id = db_process_sql_insert(
'tgis_map_layer_has_tagente',
@ -1114,7 +1114,7 @@ function gis_update_map(
}
if (array_key_exists('layer_group_list', $layer)) {
if (count($layer['layer_group_list']) > 0) {
if (empty($layer['layer_group_list']) === false && count($layer['layer_group_list']) > 0) {
foreach ($layer['layer_group_list'] as $group) {
$id = db_process_sql_insert(
'tgis_map_layer_groups',