Skip to content

Commit

Permalink
Avoid a deprecated error from PHP8.1
Browse files Browse the repository at this point in the history
Error "strtr(): Passing null to parameter tecnickcom#1 ($string) of type string is deprecated" avoided by converting value to a string.
  • Loading branch information
barto74 committed Dec 16, 2022
1 parent a336b53 commit 5c40b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/tcpdf_static.php
Expand Up @@ -286,7 +286,7 @@ public static function _escape($s) {
*/
public static function _escapeXML($str) {
$replaceTable = array("\0" => '', '&' => '&amp;', '<' => '&lt;', '>' => '&gt;');
$str = strtr($str, $replaceTable);
$str = strtr(strval($str), $replaceTable);
return $str;
}

Expand Down

0 comments on commit 5c40b91

Please sign in to comment.