@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Diffusion - double check these sub objects exist before toDictionary'ing them

Summary: wordy title. Ref T3214. Not exactly sure what a valid test is here as the user has a borked setup... Shouldn't fatal though.

Test Plan: arc lint

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3214

Differential Revision: https://secure.phabricator.com/D5995

+14 -2
+14 -2
src/applications/diffusion/data/DiffusionPathChange.php
··· 150 150 } 151 151 152 152 public function toDictionary() { 153 + $commit = $this->getCommit(); 154 + if ($commit) { 155 + $commit_dict = $commit->toDictionary(); 156 + } else { 157 + $commit_dict = array(); 158 + } 159 + $commit_data = $this->getCommitData(); 160 + if ($commit_data) { 161 + $commit_data_dict = $commit_data->toDictionary(); 162 + } else { 163 + $commit_data_dict = array(); 164 + } 153 165 return array( 154 166 'path' => $this->getPath(), 155 167 'commitIdentifier' => $this->getCommitIdentifier(), 156 - 'commit' => $this->getCommit()->toDictionary(), 157 - 'commitData' => $this->getCommitData()->toDictionary(), 168 + 'commit' => $commit_dict, 169 + 'commitData' => $commit_data_dict, 158 170 'fileType' => $this->getFileType(), 159 171 'targetPath' => $this->getTargetPath(), 160 172 'targetCommitIdentifier' => $this->getTargetCommitIdentifier(),