From: epriestley Date: Mon, 10 Jan 2011 22:15:08 +0000 (-0800) Subject: Work around an issue with older diffs in the Facebook database. X-Git-Tag: conduit-4~445 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b7ccb78eced6da0d60564e3f2ed04cb8f31b06e8;p=arcanist.git 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: --- 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'];