From: Marcin Haba Date: Sat, 27 Jun 2020 20:11:27 +0000 (+0200) Subject: baculum: Fix configure Bacula hosts page to work with PHP 7.4 X-Git-Tag: Release-9.6.6~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0488b066d51eaa6f672902afa88bc93b397def2b;p=thirdparty%2Fbacula.git baculum: Fix configure Bacula hosts page to work with PHP 7.4 --- diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php index b622cfcc6..05ba7a9a2 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.php @@ -72,6 +72,10 @@ class BaculaConfigComponents extends ComponentListTemplate { } public function createComponentListElement($sender, $param) { + if (!is_array($param->Item->Data)) { + // skip parent repeater items + return; + } $conts = array(self::MENU_CONTROL, self::ACTIONS_CONTROL); for ($i = 0; $i < count($conts); $i++) { $controls = array(self::CHILD_CONTROL, $conts[$i]); diff --git a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl index 2bf3db738..18ea121f6 100644 --- a/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl +++ b/gui/baculum/protected/Web/Portlets/BaculaConfigComponents.tpl @@ -12,7 +12,7 @@ ClientSide.OnLoading="BaculaConfig.loader_start(sender.options.ID);" ClientSide.OnComplete="BaculaConfig.set_config_items(sender.options.ID);" Attributes.onclick="return BaculaConfig.unset_config_items(this.id);" - Text="<%=$this->Data['label']%>: <%=$this->Data['component_name']%>" + Text="<%#$this->Data['label']%>: <%#$this->Data['component_name']%>" Style="text-decoration: none" />