Merge pull request #2239 from cscrewsandcaptains/develop
PHP 8.1 Support for addPreserveText
This commit is contained in:
commit
62584900b5
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ class XMLWriter extends \XMLWriter
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function writeAttribute($name, $value)
|
public function writeAttribute($name, $value)
|
||||||
{
|
{
|
||||||
if (is_float($value)) {
|
if (is_float($value)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue