Closed zadro closed 1 year ago
... or completely avoid processing string, adding
if(!$val) return "";
at line 757
How about declaring the value as string?
return strtr(htmlspecialchars((string)$val, ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace
success
fixed with (string)$val
in a recent commit
Please see error below:
Adding ternary to line 760 is a suggested fix:
return strtr(htmlspecialchars($val ?: '', ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace