Upgrade to 3.9.4
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user