- Fixes PHP Warning: Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
This commit is contained in:
Fraenkiman 2023-12-29 23:05:06 +01:00
parent c745e50a43
commit d85dc9ae43

View File

@ -296,6 +296,10 @@ class StringParser {
return false;
}
$this->_parsing = true;
{
$text = $text ?? ''; // If the value passed into function is null set $text to a blank string
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false); // Return escaped string
}
$this->_text = $this->_applyPrefilters($text);
$this->_output = null;
$this->_length = strlen($this->_text);