From f3b090c31fcd0fdda5c4edd3eb70becc76fb444e Mon Sep 17 00:00:00 2001 From: Reedy Date: Sun, 24 Mar 2019 20:47:24 +0000 Subject: [PATCH] Fix off by 1 error when displaying the number of a line with an error Change-Id: I876ba04f6903127a9d5adedfe0a5e2598a90068c --- tests/phpunit/documentation/ReleaseNotesTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/documentation/ReleaseNotesTest.php b/tests/phpunit/documentation/ReleaseNotesTest.php index 05742d73ac..d8d0fdc98c 100644 --- a/tests/phpunit/documentation/ReleaseNotesTest.php +++ b/tests/phpunit/documentation/ReleaseNotesTest.php @@ -49,7 +49,8 @@ class ReleaseNotesTest extends MediaWikiTestCase { "$type file '$fileName' is inaccessible." ); - foreach ( $file as $num => $line ) { + foreach ( $file as $i => $line ) { + $num = $i + 1; $this->assertLessThanOrEqual( // FILE_IGNORE_NEW_LINES drops the \n at the EOL, so max length is 80 not 81. 80, -- 2.20.1