Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
688 views
in Q2A Core by

I've noticed that the qa_fatal_error prints the error on the browser.

Eg :

Question2Answer fatal error:

Could not send email confirmation

Stack trace:

require() in index.php:31
require() in qa-index.php:175
qa_get_request_content() in qa-page.php:795
require() in qa-page.php:207
qa_send_new_confirm() in qa-page-confirm.php:54

This page could be displayed to a final user.

I would prefer to display an error page with the layout of the website, with a general message, and not a "technical" message to the user.

The details of the errors are already displayed server-side on the apache log.

This function furthermore "overrides" my php.ini settings smiley where I've set display_errors = Off and log_errors = On, since I do not want that the php errors arrive to the final user.... I would like that he can have a uniform layout on every page.

Do you think it's a bad idea to have a parameter exposed or something else that enable/disable this behaviour ?

So that you can have it enabled on development, but disabled in production.

Q2A version: 1.6.2
related to an answer for: Hide stack trace on fatal error?

1 Answer

0 votes
by
selected by
 
Best answer

You can override the qa_fatal_error(...) function in a plugin if you like.

...