#78766getCopyHeader in Datahandler can be invoked up til 100 times if $GLOBALS['TCA'][$table]['ctrl']['prependAtCopy'] is not configured correctly
Description
The method getCopyHeader can be invoked up to 100 times extra when copying elements if $GLOBALS[‘TCA’][$table][‘ctrl’][‘prependAtCopy’] is empty.
The solution is to fetch the label in the beginning of the method
@$label = $this->prependLabel($table)@
and change
if ($rowCount) {
return $this->getCopyHeader($table, $pid, $field, $value, $count + 1, $checkTitle);
}
to
if (($rowCount) && (!empty($this->prependLabel($table)))){
return $this->getCopyHeader($table, $pid, $field, $value, $count + 1, $checkTitle);
}