From ade64d0da8796496322d6eea1480875fbd5cd8e1 Mon Sep 17 00:00:00 2001 From: renderpci Date: Thu, 5 Oct 2017 10:49:36 +0200 Subject: [PATCH] fix empty layout map case --- .../section_records/rows_header/rows_header.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/dedalo/section_records/rows_header/rows_header.php b/lib/dedalo/section_records/rows_header/rows_header.php index 86a7c7545f..8ae3ae206b 100644 --- a/lib/dedalo/section_records/rows_header/rows_header.php +++ b/lib/dedalo/section_records/rows_header/rows_header.php @@ -5,9 +5,18 @@ $tipo = $this->section_records_obj->get_tipo(); $permissions = common::get_permissions($tipo,$tipo); $modo = $this->get_modo(); + $section_tipo = $this->section_records_obj->rows_obj->options->section_tipo; $layout_map = $this->section_records_obj->rows_obj->options->layout_map; + + + + if (empty($layout_map)) { + $layout_map = $this->section_records_obj->rows_obj->options->layout_map = array($section_tipo=>array()); + debug_log(__METHOD__." Error. layout_map is empty. Using a temporal layout_map to avoid break the section ".to_string(), logger::ERROR); + } + #dump($layout_map, ' layout_map ++ '.to_string()); + - $section_tipo = $this->section_records_obj->rows_obj->options->section_tipo; $section_list_tipo = key($this->section_records_obj->rows_obj->options->layout_map); $ar_columns_tipo = reset($this->section_records_obj->rows_obj->options->layout_map);