PreserveText preg_split fix

third parameter must be -1 not null (php 8.1 deprecate warning)
This commit is contained in:
Christian Stein 2022-06-08 14:14:25 +02:00 committed by GitHub
parent be0190cd5d
commit fc18246b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle);
$this->text = SharedText::toUTF8($text); $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])) { if (isset($matches[0])) {
$this->text = $matches; $this->text = $matches;
} }