Merge pull request #100 from visual4/master

Fix unsupported operand types error when codepoints arrays are merged
This commit is contained in:
Nicola Asuni 2018-10-16 18:22:08 +01:00 committed by GitHub
commit a38e94f98f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2003,7 +2003,10 @@ class TCPDF_FONTS {
$chars = str_split($str);
$carr = array_map('ord', $chars);
}
$currentfont['subsetchars'] += array_fill_keys($carr, true);
if (is_array($currentfont['subsetchars']) && is_array($carr))
$currentfont['subsetchars'] += array_fill_keys($carr, true);
else
$currentfont['subsetchars'] = array_merge($currentfont['subsetchars'], $carr);
return $carr;
}