1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Skip "null" lines when constructing raw documents for DocumentEngine rendering

Summary: See <https://discourse.phabricator-community.org/t/more-exceptions-when-viewing-diffs/3789>. 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
This commit is contained in:
epriestley 2020-04-25 17:27:58 -07:00
parent a226d74133
commit 7355bb7f29

View file

@ -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;
}