We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3fd3392 commit 5178e8eCopy full SHA for 5178e8e
src/Importer/Text.php
@@ -55,11 +55,9 @@ private function parse(string $subject)
55
56
\preg_match_all('~[^\[\]]+|\[(?<nested>(?R)*)\]~', $subject, $matches);
57
58
- if (null === $matches = \array_filter($matches['nested'])) {
59
- $matches = [];
60
- }
+ $matches = (array) $matches['nested'];
61
62
- foreach ($matches as $match) {
+ foreach (\array_filter($matches) as $match) {
63
$item = [];
64
$position = \strpos($match, '[');
65
0 commit comments