Please stop overwriting PHP ini ‘error_log’ value
-
Hi there,
I love your plugin, but it does one thing very frustrating… it overwrites my PHP ini value for ‘error_log’. The problem is in the file
translatepress-multilingual/includes/class-translation-render.phpwhere you have:/** * Function to hide php errors and notice and instead log them in debug.log so we don't store the notice strings inside the db if WP_DEBUG is on */ public function trp_debug_mode_off(){ if ( WP_DEBUG ) { ini_set('display_errors', 0); ini_set('log_errors', 1); ini_set('error_log', WP_CONTENT_DIR . '/debug.log'); } }When I’m in debug mode (and on my development environments I always have WP_DEBUG enabled), this forces the error_log location to be
WP_CONTENT_DIR . '/debug.log'. I don’t want this. I have a different setting forerror_log, and I want to keep it that way… but as long as Translatepress is active it’s impossible.I understand from the comment that you “don’t store the notice strings inside the db if WP_DEBUG is on”, but it is not necessary to change the value of ‘error_log’ to achieve this. I think setting ‘display_errors’ to 0 is enough already.
Please consider this and respect users who have different values for their ‘error_log’ location.
Best regards,
David Grant
Lead Developer
WP Wham
The topic ‘Please stop overwriting PHP ini ‘error_log’ value’ is closed to new replies.