From: Aryeh Gregor Date: Mon, 8 Oct 2018 17:10:36 +0000 (+0300) Subject: Suppress "Headers already sent" in PHP 7.2 too X-Git-Tag: 1.31.2~84 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=c7246fc2017718ed5f8f3ae056be478678f8a021 Suppress "Headers already sent" in PHP 7.2 too The "h" is now capitalized, so we need to update the regex. Change-Id: I1111e1228868ec66d930c7a3b0d7972e5c6356b9 (cherry picked from commit 1572f3b1b89abc958da6a7d131553e3b67953403) --- diff --git a/tests/phpunit/includes/session/PHPSessionHandlerTest.php b/tests/phpunit/includes/session/PHPSessionHandlerTest.php index 28fc04aded..0135bb91e1 100644 --- a/tests/phpunit/includes/session/PHPSessionHandlerTest.php +++ b/tests/phpunit/includes/session/PHPSessionHandlerTest.php @@ -17,7 +17,7 @@ class PHPSessionHandlerTest extends MediaWikiTestCase { // Ignore "headers already sent" warnings during this test set_error_handler( function ( $errno, $errstr ) use ( &$warnings ) { - if ( preg_match( '/headers already sent/', $errstr ) ) { + if ( preg_match( '/[hH]eaders already sent/', $errstr ) ) { return true; } return false;