Suppress "Headers already sent" in PHP 7.2 too
authorAryeh Gregor <ayg@aryeh.name>
Mon, 8 Oct 2018 17:10:36 +0000 (20:10 +0300)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 16 Oct 2018 00:50:26 +0000 (17:50 -0700)
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

index 28fc04a..0135bb9 100644 (file)
@@ -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;