If you’ve ever come across the infuriating error

1
htmlspecialchars(): Invalid multibyte sequence in argument

I have a simple solution for you: Turn display_errors on in your php.ini file!
It turns out there’s a weird bug that doesn’t appear to be getting fixed any time soon that causes htmlspecialchars() to display this error only when display_errors is set to Off.