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

issue #6076
parent a8688870
......@@ -352,7 +352,7 @@ class template
$specialAttrs['caller'.strtoupper($attr)] = $ui->$attr;
}
$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;
return $this->tabObject;
......
......@@ -457,7 +457,7 @@ class simpleTabs
* \param array $attrs an LDAP-like values array
* \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) {
logging::debug(DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $key, "Adapting");
......
Markdown is supported
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