From: Brion Vibber Date: Mon, 18 May 2009 19:08:53 +0000 (+0000) Subject: Move wfDebug() call about use of PHP mail() function to _before_ we mess around with... X-Git-Tag: 1.31.0-rc.0~41753 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=74016b75655c1d9805255f90166816eabac514d9;p=lhc%2Fweb%2Fwiklou.git 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. --- 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)) {