Unverified Commit 5cb82a85 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(template) Fix fatal error when template has no asked fields

issue #6076
Showing with 2 additions and 2 deletions
+2 -2
...@@ -352,7 +352,7 @@ class template ...@@ -352,7 +352,7 @@ class template
$specialAttrs['caller'.strtoupper($attr)] = $ui->$attr; $specialAttrs['caller'.strtoupper($attr)] = $ui->$attr;
} }
$this->attrs = templateHandling::parseArray($this->attrs, $specialAttrs, $targetdn); $this->attrs = templateHandling::parseArray($this->attrs, $specialAttrs, $targetdn);
$this->tabObject->adapt_from_template($this->attrs, array_merge(...array_values($this->attributes))); $this->tabObject->adapt_from_template($this->attrs, array_merge([], ...array_values($this->attributes)));
$this->applied = TRUE; $this->applied = TRUE;
return $this->tabObject; return $this->tabObject;
......
...@@ -457,7 +457,7 @@ class simpleTabs ...@@ -457,7 +457,7 @@ class simpleTabs
* \param array $attrs an LDAP-like values array * \param array $attrs an LDAP-like values array
* \param array $skip Attributes to skip * \param array $skip Attributes to skip
*/ */
function adapt_from_template ($attrs, $skip = []) function adapt_from_template (array $attrs, array $skip = [])
{ {
foreach ($this->by_object as $key => &$obj) { foreach ($this->by_object as $key => &$obj) {
logging::debug(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Adapting"); logging::debug(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Adapting");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment