Skip to content

Commit

Permalink
Fix getProjectConfig error with formFilterLayers and group_visibility…
Browse files Browse the repository at this point in the history
… set

formFilterLayers in config has been considered as an array while it is a class
=> Cannot use object of type stdClass as array
  • Loading branch information
nboisteault committed Dec 3, 2020
1 parent 9dec251 commit 7822dc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lizmap/modules/lizmap/classes/lizmapProject.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,7 @@ public function getUpdatedConfig()
if (property_exists($configJson->editionLayers, $key)) {
unset($configJson->editionLayers->{$key});
}
// datavizLayers
// datavizLayers (array)
if (property_exists($configJson, 'datavizLayers')) {
$dvlLayers = $configJson->datavizLayers['layers'];
foreach ($dvlLayers as $o => $c) {
Expand All @@ -1998,10 +1998,10 @@ public function getUpdatedConfig()
$configJson->options->atlasEnabled = 'False';
}
// multi-atlas
// formFilterLayers
// formFilterLayers (class)
foreach ($configJson->formFilterLayers as $o => $c) {
if ($c['layerId'] = $obj->id) {
unset($configJson->formFilterLayers[$o]);
if (property_exists($c, 'layerId') && $c->layerId == $obj->id) {
unset($configJson->formFilterLayers->{$o});
}
}
// relations
Expand Down

0 comments on commit 7822dc5

Please sign in to comment.