mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-18 11:03:05 -04:00
Fix safe_ascii (#5311)
Fix https://github.com/FreshRSS/FreshRSS/issues/5310
This commit is contained in:
committed by
GitHub
parent
8cc8127c3c
commit
687d0b40a8
@@ -132,8 +132,8 @@ function checkUrl(string $url, bool $fixScheme = true) {
|
||||
}
|
||||
}
|
||||
|
||||
function safe_ascii(string $text): string {
|
||||
return filter_var($text, FILTER_DEFAULT, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH) ?: '';
|
||||
function safe_ascii(?string $text): string {
|
||||
return $text === null ? '' : (filter_var($text, FILTER_DEFAULT, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH) ?: '');
|
||||
}
|
||||
|
||||
if (function_exists('mb_convert_encoding')) {
|
||||
|
||||
Reference in New Issue
Block a user