Page MenuHomePhabricator

Transactions - don't let objects mention themselves.
ClosedPublic

Authored by btrahan on Sep 10 2014, 5:13 PM.
Tags
None
Referenced Files
F15527364: D10464.id25166.diff
Tue, Apr 22, 3:10 AM
F15527363: D10464.id25162.diff
Tue, Apr 22, 3:10 AM
F15527362: D10464.id25165.diff
Tue, Apr 22, 3:10 AM
F15517533: D10464.diff
Sat, Apr 19, 3:36 AM
F15464235: D10464.id25162.diff
Wed, Apr 2, 7:37 AM
F15443059: D10464.id.diff
Thu, Mar 27, 2:00 AM
Unknown Object (File)
Mar 3 2025, 12:11 PM
Unknown Object (File)
Feb 23 2025, 3:47 PM
Subscribers

Details

Summary

Fixes T6059.

Test Plan

Made a comment on TX mentioning TX and TX+1. TX did not get a "mentioned" transaction while TX+1 did.

Diff Detail

Repository
rP Phabricator
Branch
T6059
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2491
Build 2495: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

btrahan retitled this revision from to Transactions - don't let objects mention themselves..
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
1214

I think $object->getPHID() is potentially null here (i.e., this code can run during creation of a new object, before the object is saved). We'll still get the right result since it's impossible to mention a nonexistent object, but adding an explicit if ($object->getPHID()) { ... } check might make this more clear some day down the line.

This revision is now accepted and ready to land.Sep 10 2014, 5:17 PM
btrahan edited edge metadata.
  • add $object->getPHID() && to if conditional for clarity
  • slap a comment on there too
btrahan updated this revision to Diff 25166.

Closed by commit rP13834f140617 (authored by @btrahan).