Skip to content

Commit 4a9943e

Browse files
authored
[BUGFIX] Skip array_merge if recipients is not an array (#298)
Resolves: #263
1 parent 017d4a7 commit 4a9943e

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ insert_final_newline = true
1313
indent_style = tab
1414

1515
# YAML-Files
16-
[{*.yml,*.yaml}]
16+
[{*.yml,*.yaml,*.yml.fixture,*.yaml.fixture}]
1717
indent_size = 2
1818

1919
# XML-Files
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
finishers:
2+
-
3+
options:
4+
recipients:
5+
'':''
6+
senderAddress: ''
7+
senderName: SENDERNAME
8+
identifier: EmailToReceiver
9+
-----
10+
finishers:
11+
-
12+
options:
13+
recipients:
14+
'':''
15+
senderAddress: ''
16+
senderName: SENDERNAME
17+
identifier: EmailToReceiver

packages/typo3-fractor/rules/TYPO3v10/Yaml/EmailFinisherYamlFractor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ private function refactorFinishers(array $finishers, array &$yamlToModify): void
134134
}
135135

136136
if (isset($finisher[self::OPTIONS][self::RECIPIENTS])) {
137+
if (! is_array($yamlToModify[self::FINISHERS][$finisherKey][self::OPTIONS][self::RECIPIENTS])) {
138+
continue;
139+
}
137140
$yamlToModify[self::FINISHERS][$finisherKey][self::OPTIONS][self::RECIPIENTS] = array_merge(
138141
$recipients,
139142
$yamlToModify[self::FINISHERS][$finisherKey][self::OPTIONS][self::RECIPIENTS]

0 commit comments

Comments
 (0)