@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 an issue where editing paths in Owners packages could raise an error: undefined index "display"

Summary:
Fixes T13464. Fully-realized paths have a "path" (normalized, effective path) and a "display" path (user-facing, un-normalized path).

During transaction validation we build ref keys for paths before we normalize the "display" values. A few different approaches could be taken to resolve this, but just default the "display" path to the raw "path" if it isn't present since that seems simplest.

Test Plan: Edited paths in an Owners package, no longer saw a warning in the logs.

Maniphest Tasks: T13464

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

+12 -1
+12 -1
src/applications/owners/storage/PhabricatorOwnersPath.php
··· 91 91 } 92 92 93 93 private static function getScalarKeyForRef(array $ref) { 94 + // See T13464. When building refs from raw transactions, the path has 95 + // not been normalized yet and doesn't have a separate "display" path. 96 + // If the "display" path isn't populated, just use the actual path to 97 + // build the ref key. 98 + 99 + if (isset($ref['display'])) { 100 + $display = $ref['display']; 101 + } else { 102 + $display = $ref['path']; 103 + } 104 + 94 105 return sprintf( 95 106 'repository=%s path=%s display=%s excluded=%d', 96 107 $ref['repositoryPHID'], 97 108 $ref['path'], 98 - $ref['display'], 109 + $display, 99 110 $ref['excluded']); 100 111 } 101 112