Closed pincombe closed 7 months ago
Wouldn't it make more sense to check for $value === null
and return an empty string directly? I'm sure htmlentities
is smart about it but calling it with an empty string seems a bit odd. WDYT?
I'm more than happy switch it over to an if statement instead however the use of ?? '' seems to be the standard way that other projects within laravel are dealing with the PHP change.
I've included a link below to a search within the laravel framework for ?? '' https://github.com/search?q=org%3Alaravel+%3F%3F+%27%27&type=code
Just to let you know i've updated to function to match your requested changes.
Minor change to fix depreciation warning on a null string