Use native PHP preg_split instead of library (#7741)
The original library version was created to fix a bug that was from 2008. This bug has been fixed for a long time and the native tool improved.
This commit is contained in:
@@ -1998,7 +1998,7 @@ class TCPDF_FONTS {
|
|||||||
public static function UTF8StringToArray($str, $isunicode, &$currentfont) {
|
public static function UTF8StringToArray($str, $isunicode, &$currentfont) {
|
||||||
if ($isunicode == true) {
|
if ($isunicode == true) {
|
||||||
// requires PCRE unicode support turned on
|
// requires PCRE unicode support turned on
|
||||||
$chars = TCPDF_STATIC::pregSplit('//','u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
$chars = preg_split('//u', $str, -1, PREG_SPLIT_NO_EMPTY);
|
||||||
$carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
|
$carr = array_map(array('TCPDF_FONTS', 'uniord'), $chars);
|
||||||
} else {
|
} else {
|
||||||
$chars = str_split($str);
|
$chars = str_split($str);
|
||||||
|
|||||||
Reference in New Issue
Block a user