Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
php8.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
rskrzypczak committed Oct 31, 2023
1 parent 971a27c commit b2f9109
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Purifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ public static function bool($value)
*/
public static function encodeHtml($string)
{
return $string !== null ? htmlspecialchars($string, ENT_QUOTES, static::$defaultCharset) : $string;
return $string !== null ? htmlspecialchars($string, ENT_QUOTES, static::$defaultCharset) : '';
}

/**
Expand All @@ -603,7 +603,7 @@ public static function encodeHtml($string)
*/
public static function decodeHtml($string)
{
return $string !== null ? html_entity_decode($string, ENT_QUOTES, static::$defaultCharset) : $string;
return $string !== null ? html_entity_decode($string, ENT_QUOTES, static::$defaultCharset) : '';
}
}

Expand Down

0 comments on commit b2f9109

Please sign in to comment.