When I'm developing my REST API in PHP I'm working with application/json
output, so when I get errors while testing in the browser they look like this:
<b>Fatal error</b>: Uncaught exception 'Exception' with message 'PDO caught an error:
array(3) {
[0]=>
string(5) "42000"
[1]=>
int(1065)
[2]=>
string(15) "Query was empty"
}
And it gets worse when I get large stack traces and stuff. So is there a flag I can set telling PHP that I want my errors unescaped and in raw text?
log_errors_max_len
. – Overshine