PHP 8.1 compatability fix for PreserveText

This commit is contained in:
Michael Als 2022-03-29 13:13:45 +00:00
parent be0190cd5d
commit 2bba013311
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class PreserveText extends AbstractElement
$this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle);
$this->text = SharedText::toUTF8($text);
$matches = preg_split('/({.*?})/', $this->text, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$matches = preg_split('/({.*?})/', $this->text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
if (isset($matches[0])) {
$this->text = $matches;
}