@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.

Correctly handle downloading ZIP with empty directories in Phragment

Summary: This logic causes an exception because getPHID() is called on a fragment that has no latest version. This fixes the code so that in this scenario, it returns an empty array (with no path to be added to the ZIP).

Test Plan: Downloaded the ZIP successfully after the patch was applied.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4205

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

+3
+3
src/applications/phragment/controller/PhragmentZIPController.php
··· 95 95 96 96 if (count($children) === 0) { 97 97 $path = substr($current->getPath(), strlen($base_path) + 1); 98 + if ($current->getLatestVersion() === null) { 99 + return array(); 100 + } 98 101 return array($path => $current->getLatestVersion()->getFilePHID()); 99 102 } else { 100 103 $mappings = array();