Closed mjim closed 5 months ago
Thank you!
Instead of:
if ($input === null) { $input = ''; }
Could we not just have: function out(?string $input='', string $encoding = 'UTF-8', string $output_format = 'html'): string {
Ignore my stupid comment above (and thanks to Dafa for showing me the light).
mjim (Jim) - Thank you for this glorious contribution. We're all super grateful. Hail Jim!
This is useful if you have a form that populates with no data then fills after a validation error or database query.
Other wise you'll get this error.
Fatal error: Uncaught TypeError: out(): Argument #1 ($input) must be of type string, null given