Upgrade to 3.9.4

This commit is contained in:
Bastian Allgeier
2023-04-21 11:26:07 +02:00
parent cd495f054e
commit 38c8ba7e59
57 changed files with 4658 additions and 87 deletions

View File

@@ -172,15 +172,21 @@ class File extends ModelWithContent
* other content.
*
* @internal
* @param array $data
* @param string|null $languageCode
* @return array
*/
public function contentFileData(array $data, string $languageCode = null): array
{
return A::append($data, [
'template' => $data['template'] ?? $this->template(),
]);
public function contentFileData(
array $data,
string $languageCode = null
): array {
// only add the template in, if the $data array
// doesn't explicitly unsets it
if (
array_key_exists('template', $data) === false &&
$template = $this->template()
) {
$data['template'] = $template;
}
return $data;
}
/**