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

Partial fix for owners bug where a package's repository doesn't exist.

Summary: Avoid requesting a non-existent repository...

Test Plan: Delete a repo that has an associated owners package. Then verify that the owners list page no longer throws an exception.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1372

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

authored by

20after4 and committed by
epriestley
fea67c98 6b8295d1

+20 -16
+20 -16
src/applications/owners/controller/PhabricatorOwnersListController.php
··· 262 262 $pkg_paths = idx($paths, $package->getID(), array()); 263 263 foreach ($pkg_paths as $key => $path) { 264 264 $repo = $repositories[$path->getRepositoryPHID()]; 265 - $drequest = DiffusionRequest::newFromDictionary( 266 - array( 267 - 'repository' => $repo, 268 - 'path' => $path->getPath(), 269 - )); 270 - $href = $drequest->generateURI( 271 - array( 272 - 'action' => 'browse', 273 - )); 274 - $pkg_paths[$key] = 275 - '<strong>'.phutil_escape_html($repo->getName()).'</strong> '. 276 - phutil_render_tag( 277 - 'a', 265 + if ($repo) { 266 + $drequest = DiffusionRequest::newFromDictionary( 278 267 array( 279 - 'href' => (string) $href, 280 - ), 281 - phutil_escape_html($path->getPath())); 268 + 'repository' => $repo, 269 + 'path' => $path->getPath(), 270 + )); 271 + $href = $drequest->generateURI( 272 + array( 273 + 'action' => 'browse', 274 + )); 275 + $pkg_paths[$key] = 276 + '<strong>'.phutil_escape_html($repo->getName()).'</strong> '. 277 + phutil_render_tag( 278 + 'a', 279 + array( 280 + 'href' => (string) $href, 281 + ), 282 + phutil_escape_html($path->getPath())); 283 + } else { 284 + $pkg_paths[$key] = phutil_escape_html($path->getPath()); 285 + } 282 286 } 283 287 $pkg_paths = implode('<br />', $pkg_paths); 284 288