When a fatal error occurs (function  `fatal_error`), Piwigo will apparently always display an error page with an error message and a backtrace.
(The php configuration options `display_errors` and) the local config options `show_php_errors_on_frontend` / `show_php_errors` seem to be ignored in this case.

This is apparently because the function signature is `function fatal_error($msg, $title=null, $show_trace=true)`, and all (?) callers only pass the first argument.

This could be a security concern (I guess?), a lot of web hosting guides recommend to switch off displaying PHP errors on the frontend. I would prefer to just have a generic "Internal Server Error" be displayed (especially with the config options set as they are).

I encountered this when I set up a separate PHP pool, running it as a separate user, after I already set up Piwigo. As a result, the `_data` directory contents were not writable, and Piwigo was complaining about this.

Piwigo version: 14.3.0

fatal_error always shows error / backtrace, no matter how show_php_errors_on_frontend / show_php_errors are set
This is a GitHub Issue
repo:Piwigo
owner:Piwigo
Title : fatal_error always shows error / backtrace, no matter how show_php_errors_on_frontend / show_php_errors are set
Issue date:

--- start body ---
When a fatal error occurs (function  `fatal_error`), Piwigo will apparently always display an error page with an error message and a backtrace.
(The php configuration options `display_errors` and) the local config options `show_php_errors_on_frontend` / `show_php_errors` seem to be ignored in this case.

This is apparently because the function signature is `function fatal_error($msg, $title=null, $show_trace=true)`, and all (?) callers only pass the first argument.

This could be a security concern (I guess?), a lot of web hosting guides recommend to switch off displaying PHP errors on the frontend. I would prefer to just have a generic "Internal Server Error" be displayed (especially with the config options set as they are).

I encountered this when I set up a separate PHP pool, running it as a separate user, after I already set up Piwigo. As a result, the `_data` directory contents were not writable, and Piwigo was complaining about this.

Piwigo version: 14.3.0

--- end body ---
