Fixed bug with footer preserve text

This commit is contained in:
Gabriel Bull 2014-03-09 15:11:51 -04:00
parent a6671c2f0f
commit 79f65f04e1
1 changed files with 4 additions and 2 deletions

View File

@ -89,8 +89,10 @@ class PHPWord_Section_Footer_PreserveText
$this->_styleParagraph = $styleParagraph;
}
$pattern = '/({.*?})/';
$this->_text = preg_split($pattern, $text, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
$matches = preg_split('/({.*?})/', $text, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
if (isset($matches[0])) {
$this->_text = $matches[0];
}
return $this;
}