From c7246fc2017718ed5f8f3ae056be478678f8a021 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Mon, 8 Oct 2018 20:10:36 +0300 Subject: [PATCH] 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) --- tests/phpunit/includes/session/PHPSessionHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1