Skip to content

Commit

Permalink
Fixed null value deprecation (#613)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Bouma <[email protected]>
  • Loading branch information
pincombe and stayallive authored Jan 24, 2024
1 parent 45d37ae commit c9f7e78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Former/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ public static function setApp(Container $app)
/**
* Encodes HTML
*
* @param string $value The string to encode
* @param string|null $value The string to encode
*
* @return string
*/
public static function encode($value)
{
if ($value === null) {
return '';
}

return htmlentities($value, ENT_QUOTES, 'UTF-8', true);
}

Expand Down

0 comments on commit c9f7e78

Please sign in to comment.