Skip to content

Commit

Permalink
Avoid a deprecated error from PHP8.1 (#573)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicola Asuni <[email protected]>
Co-authored-by: William Desportes <[email protected]>
  • Loading branch information
3 people authored Dec 17, 2022
1 parent a336b53 commit ef356f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/tcpdf_static.php
Original file line number Diff line number Diff line change
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($str === null ? '' : $str, $replaceTable);
return $str;
}

Expand Down

0 comments on commit ef356f0

Please sign in to comment.