From b7ccb78eced6da0d60564e3f2ed04cb8f31b06e8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 10 Jan 2011 14:15:08 -0800 Subject: [PATCH] Work around an issue with older diffs in the Facebook database. Summary: We have some diffs which predate property tracking and are shipping down sketch data, work around it in the client for now. Test Plan: Reviewers: CC: --- src/parser/diff/change/ArcanistDiffChange.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/parser/diff/change/ArcanistDiffChange.php b/src/parser/diff/change/ArcanistDiffChange.php index 61a133a8..d45402d7 100644 --- a/src/parser/diff/change/ArcanistDiffChange.php +++ b/src/parser/diff/change/ArcanistDiffChange.php @@ -63,9 +63,11 @@ class ArcanistDiffChange { $obj->metdadata = $dict['metadata']; $obj->oldPath = $dict['oldPath']; $obj->currentPath = $dict['currentPath']; - $obj->awayPaths = $dict['awayPaths']; - $obj->oldProperties = $dict['oldProperties']; - $obj->newProperties = $dict['newProperties']; + // TODO: The backend is shipping down some bogus data, e.g. diff 199453. + // Should probably clean this up. + $obj->awayPaths = nonempty($dict['awayPaths'], array()); + $obj->oldProperties = nonempty($dict['oldProperties'], array()); + $obj->newProperties = nonempty($dict['newProperties'], array()); $obj->type = $dict['type']; $obj->fileType = $dict['fileType']; $obj->commitHash = $dict['commitHash'];