Page MenuHomePhabricator

D10916.diff
No OneTemporary

D10916.diff

diff --git a/src/infrastructure/edges/query/PhabricatorEdgeQuery.php b/src/infrastructure/edges/query/PhabricatorEdgeQuery.php
--- a/src/infrastructure/edges/query/PhabricatorEdgeQuery.php
+++ b/src/infrastructure/edges/query/PhabricatorEdgeQuery.php
@@ -260,20 +260,21 @@
'You must execute() a query before you you can getDestinationPHIDs().');
}
- $src_phids = array_fill_keys($src_phids, true);
- $types = array_fill_keys($types, true);
-
$result_phids = array();
- foreach ($this->resultSet as $src => $edges_by_type) {
- if ($src_phids && empty($src_phids[$src])) {
- continue;
+
+ $set = $this->resultSet;
+ if ($src_phids) {
+ $set = array_select_keys($set, $src_phids);
+ }
+
+ foreach ($set as $src => $edges_by_type) {
+ if ($types) {
+ $edges_by_type = array_select_keys($edges_by_type, $types);
}
- foreach ($edges_by_type as $type => $edges_by_dst) {
- if ($types && empty($types[$type])) {
- continue;
- }
- foreach ($edges_by_dst as $dst => $edge) {
- $result_phids[$dst] = true;
+
+ foreach ($edges_by_type as $edges) {
+ foreach ($edges as $edge_phid => $edge) {
+ $result_phids[$edge_phid] = true;
}
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, May 18, 8:11 AM (4 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6296168
Default Alt Text
D10916.diff (1 KB)

Event Timeline