Differential D16171 Diff 38902 src/infrastructure/edges/engineextension/PhabricatorEdgesDestructionEngineExtension.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/edges/engineextension/PhabricatorEdgesDestructionEngineExtension.php
Show All 22 Lines | try { | ||||
// This is (presumably) a "no edges for this PHID type" exception. | // This is (presumably) a "no edges for this PHID type" exception. | ||||
return; | return; | ||||
} | } | ||||
$editor = new PhabricatorEdgeEditor(); | $editor = new PhabricatorEdgeEditor(); | ||||
foreach ($edges as $type => $type_edges) { | foreach ($edges as $type => $type_edges) { | ||||
foreach ($type_edges as $src => $src_edges) { | foreach ($type_edges as $src => $src_edges) { | ||||
foreach ($src_edges as $dst => $edge) { | foreach ($src_edges as $dst => $edge) { | ||||
try { | |||||
$editor->removeEdge($edge['src'], $edge['type'], $edge['dst']); | $editor->removeEdge($edge['src'], $edge['type'], $edge['dst']); | ||||
} catch (Exception $ex) { | |||||
// We can run into an exception while removing the edge if the | |||||
// edge type no longer exists. This prevents us from figuring out | |||||
// if there's an inverse type. Just ignore any errors here and | |||||
// continue, since the best we can do is clean up all the edges | |||||
// we still have information about. See T11201. | |||||
phlog($ex); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | |||||
$editor->save(); | $editor->save(); | ||||
} | } | ||||
} | } |