replace invalid strtr with str_replace

This commit is contained in:
Dennis Eichhorn 2023-08-02 08:34:57 +00:00
parent 5b01eda18b
commit 03a9cf0aef
2 changed files with 2 additions and 2 deletions

View File

@ -1597,7 +1597,7 @@ class PclZip
if (is_string($p_options_list[$i + 1])) {
// ----- Remove spaces
$p_options_list[$i + 1] = strtr($p_options_list[$i + 1], ' ', '');
$p_options_list[$i + 1] = \str_replace(' ', '', $p_options_list[$i + 1]);
// ----- Parse items
$v_work_list = explode(",", $p_options_list[$i + 1]);

View File

@ -600,7 +600,7 @@ class TCPDF_PARSER {
++$offset;
if (($char == '<') AND (preg_match('/^([0-9A-Fa-f\x09\x0a\x0c\x0d\x20]+)>/iU', substr($this->pdfdata, $offset), $matches) == 1)) {
// remove white space characters
$objval = strtr($matches[1], "\x09\x0a\x0c\x0d\x20", '');
$objval = \str_replace(["\x09", "\x0a", "\x0c", "\x0d", "\x20"], '', $matches[1]);
$offset += strlen($matches[0]);
} elseif (($endpos = strpos($this->pdfdata, '>', $offset)) !== FALSE) {
$offset = $endpos + 1;