Skip to content

Commit 5765770

Browse files
Support PHP 8.1
Apparently `str_split` behaved differently on PHP 8.1 when fed an empty string.
1 parent c2a00c5 commit 5765770

File tree

1 file changed

+2
-0
lines changed
  • src/PhpSpreadsheet/Calculation/TextData

1 file changed

+2
-0
lines changed

src/PhpSpreadsheet/Calculation/TextData/Thai.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ private static function convertLarge(string $digits): string
9494
...str_split(substr($digits, $length), 6),
9595
];
9696

97+
$chunks = array_filter($chunks, fn (string $chunk): bool => $chunk !== '');
98+
9799
return implode(
98100
self::THAI_UNITS[6],
99101
array_map(self::convertBlock(...), $chunks)

0 commit comments

Comments
 (0)