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)
committerAryeh Gregor <ayg@aryeh.name>
Mon, 8 Oct 2018 17:10:36 +0000 (20:10 +0300)
The "h" is now capitalized, so we need to update the regex.

Change-Id: I1111e1228868ec66d930c7a3b0d7972e5c6356b9

tests/phpunit/includes/session/PHPSessionHandlerTest.php

index b001eb9..b191a2f 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;