A PHP Error was encountered Severity: 8192 Message: trim(): Passing null to parameter #1 ($string)
A PHP Error was encountered Severity: 8192 Message: trim(): Passing null to parameter #1 ($string) of type string is deprecated Filename: libraries/Form_validation.php Line Number: 1059
How can my custom error handler detect if the same error will also be thrown by PHP as an ErrorException?
I’m trying to update an older application to make use of newer PHP 8.2+ features. Many internal PHP errors are now automatically thrown as ErrorException
objects.
Giving a custom response to a MYSQL error
I seem to have a problem that others have reported but the answers provided in other threads do not work in my case. I have code to connect to my db and it works fine, I can use it to connect and insert rows in tables etc. I am testing error handling and that does not work. If I cause an error in the mysqli_connect line, the DIE never executes. Instead I get the ugly PHP error screen “Fatal error: Uncaught mysqli_sql_exception: …“. How do I output my own custom user-friendly error messages instead?
Empty page PHP8.3 instead of error message output
The following code has a problem with the access level of $bla.
Normally I would expect the error output “Fatal error: Access level to mySlave::$bla must be public (as in class myMaster)”. But my page is just empty/white althoug all error reporting is activated.
I have this on two different systems while php-sandbox pages show the error message.