From 7355bb7f295693218b0c2b6616a569be819ace2b Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 25 Apr 2020 17:27:58 -0700 Subject: [PATCH] Skip "null" lines when constructing raw documents for DocumentEngine rendering Summary: See . This is a similar issue with the same datastructure. Test Plan: Works correctly under PHP 7.3, but this may not be the end of things. Differential Revision: https://secure.phabricator.com/D21171 --- .../differential/parser/DifferentialChangesetParser.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index 68b31344df..18217d7394 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -1901,9 +1901,13 @@ final class DifferentialChangesetParser extends Phobject { $text = array(); foreach ($lines as $line) { + if ($line === null) { + continue; + } + // If this is a "No newline at end of file." annotation, don't hand it // off to the DocumentEngine. - if ($line['type'] == '\\') { + if ($line['type'] === '\\') { continue; }