diff --git a/application/modules/admin/controllers/ModulesController.php b/application/modules/admin/controllers/ModulesController.php index a66a0671603a92b200878af3e53365a58d098c04..eea626f7e69f58bc3013fb25dc84e50956861690 100644 --- a/application/modules/admin/controllers/ModulesController.php +++ b/application/modules/admin/controllers/ModulesController.php @@ -329,13 +329,22 @@ class Admin_ModulesController extends ZendAfi_Controller_Action { protected function processZones($zone_name) { $links_zones = $this->_getParam($zone_name.'_zone', []); $links_fields = $this->_getParam($zone_name.'_url', []); - if ($zone_name == 'link') - $links_labels = $this->_getParam('link_label', []); + $links_labels = ($zone_name == 'link') + ? $this->_getParam('link_label', []) + : []; $packer = new Class_Profil_ConfigPacker(); for ($i = 0; $i < count($links_zones); $i++) { - if ('' == $links_zones[$i] && '' == $links_fields[$i]) - continue; - $packer->add([$links_zones[$i], $links_fields[$i]]); + + if ($links_zones[$i] == '' + && $links_fields[$i] == '' + && (($zone_name == 'link') ? ($links_labels[$i] == '') : 1)) + continue; + + $data = [$links_zones[$i], $links_fields[$i]]; + + if ($zone_name == 'link') + $data[] = $links_labels[$i]; + $packer->add($data); } return $packer->pack();