Commit 1f6bb5fc authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6076-fatal-error-when-apply-template-for-supann-entity' into '1.4-dev'

Resolve "Fatal error when applying template with no asked fields"

See merge request fusiondirectory/fd!745
parents a8688870 5cb82a85
......@@ -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