-
Improvement
-
Resolution: Fixed
-
Minor
-
3.0.9-RC2
-
None
-
None
https://github.com/phpbb/phpbb3/blob/develop-olympus/phpBB/includes/functions_messenger.php#L1617
ob_start();
|
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
|
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
|
// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
|
$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
|
$err_msg = ob_get_clean();
|
We now have an error collector class which should be used instead of output buffering and errors going through our error collector.
In 3.0.9-RC2, msg_handler performs ob_flush which 1) sends output to browser before headers are sent, creating warnings, and 2) results in ob_get_clean not getting any of the output, thus defeating the entire purpose of this code.
For 3.0.9-RC3 msg_handler will no longer flush, but the correct way to collect errors is to use the error collector.
- depends on
-
PHPBB-10369 Change error collector to always report errfile and errline
- Unverified Fix
- is related to
-
PHPBB-10244 Audit flush/ob_flush calls
- Closed