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

Fix a fatal in blame when the viewer can't see a revision because of a permission issue

Summary:
Fixes T13040. To reproduce:

- View a file with blame enabled, where some line has an associated revision (say, `D123`).
- Edit `D123` so it exists and is a valid revision, but the viewer can't see it.
- Reload the page.

Instead, only add revisions to the map if we actually managed to load them.

Test Plan: Page no longer fatals.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13040

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

+4
+4
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 947 947 } 948 948 949 949 foreach ($revision_ids as $commit_phid => $revision_id) { 950 + // If the viewer can't actually see this revision, skip it. 951 + if (!isset($revisions[$revision_id])) { 952 + continue; 953 + } 950 954 $revision_map[$commit_map[$commit_phid]] = $revision_id; 951 955 } 952 956 }