mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Fixed: htmlspecialchars(): Passing null to parameter (#719)
This commit is contained in:
parent
6e4c8a1b88
commit
64976d1049
1 changed files with 3 additions and 3 deletions
|
@ -358,12 +358,12 @@ function prn_r($var, $title = '', $print = true)
|
|||
* @param $txt
|
||||
* @param bool $double_encode
|
||||
* @param int $quote_style
|
||||
* @param string $charset
|
||||
* @param ?string $charset
|
||||
* @return string
|
||||
*/
|
||||
function htmlCHR($txt, $double_encode = false, $quote_style = ENT_QUOTES, $charset = 'UTF-8')
|
||||
function htmlCHR($txt, bool $double_encode = false, int $quote_style = ENT_QUOTES, ?string $charset = 'UTF-8'): string
|
||||
{
|
||||
return (string)htmlspecialchars($txt, $quote_style, $charset, $double_encode);
|
||||
return (string)htmlspecialchars($txt ?? '', $quote_style, $charset, $double_encode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue