From 74016b75655c1d9805255f90166816eabac514d9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 18 May 2009 19:08:53 +0000 Subject: [PATCH] Move wfDebug() call about use of PHP mail() function to _before_ we mess around with warning/error reporting. Previously, a failure to open the debug log file for writing would end up getting reported as a failure of mail delivery, even though we were successful. It'll now fail silently (as it should) and won't interfere with the actual mail() call's error reporting. --- includes/UserMailer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/UserMailer.php b/includes/UserMailer.php index b6484935d1..97195fbf7f 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -188,11 +188,12 @@ class UserMailer { $headers .= "{$endl}Reply-To: " . $replyto->toString(); } + wfDebug( "Sending mail via internal mail() function\n" ); + $wgErrorString = ''; $html_errors = ini_get( 'html_errors' ); ini_set( 'html_errors', '0' ); set_error_handler( array( 'UserMailer', 'errorHandler' ) ); - wfDebug( "Sending mail via internal mail() function\n" ); if (function_exists('mail')) { if (is_array($to)) { -- 2.20.1