Skip to content

Commit 846e303

Browse files
authored
fix passing null value to preg_split (#507)
1 parent 8dd3e6d commit 846e303

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

UPGRADE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- **[IMPROVEMENT]** Doctrine ORM 3.0 Support [#503](https://github.com/dachcom-digital/pimcore-formbuilder/pull/503)
88
- **[BUGFIX]** API Channel: Keep array index when merging child nodes [@simon-matt-oetztal](https://github.com/dachcom-digital/pimcore-formbuilder/pull/496)
99
- **[BUGFIX]** Update Custom Channel Documentation [#493](https://github.com/dachcom-digital/pimcore-formbuilder/issues/493)
10+
- **[BUGFIX]** Fix passing null value to `preg_split`
1011

1112
## 5.1.4
1213
- **[BUGFIX]** Allow using double-opt-in variables in placeholder processor

src/OutputWorkflow/Channel/Email/Parser/MailParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ protected function extractPlaceHolder(string $str, array $fieldValues): mixed
227227
$str = str_replace($matches[0][$key], $value, $str);
228228
}
229229

230-
//remove invalid commas
231-
$fragments = preg_split('@,@', $str, null, PREG_SPLIT_NO_EMPTY);
230+
// remove invalid commas
231+
$fragments = preg_split('@,@', $str, -1, PREG_SPLIT_NO_EMPTY);
232232
$fragmentsGlued = is_array($fragments) ? implode(',', $fragments) : $fragments;
233233
$extractedValue = is_string($fragmentsGlued) ? trim($fragmentsGlued) : $fragmentsGlued;
234234

0 commit comments

Comments
 (0)