diff --git a/plugi-core/src/Core/helpers.php b/plugi-core/src/Core/helpers.php index 8b2ff94..e605c56 100644 --- a/plugi-core/src/Core/helpers.php +++ b/plugi-core/src/Core/helpers.php @@ -7,13 +7,13 @@ if (! function_exists('phpb_e')) { /** * Encode HTML special characters in a string. * - * @param string $value + * @param string|null $value * @param bool $doubleEncode * @return string */ - function phpb_e(string $value, bool $doubleEncode = true): string + function phpb_e(?string $value, bool $doubleEncode = true): string { - return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode); + return htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8', $doubleEncode); } }