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

Revert throwing error when setting non-existing object subscribers

Summary:
Revert rPbabeed68 which can lead to an error when commenting on a task:
```
Subscriber transactions must be existing PHIDs or usernames (found key "0" on transaction of type "core:subscribers").
```

Looks like Phorge is pretty inconsistent in its array keys when passing subscriber arrays around - sometimes the keys are default integers, sometimes they duplicate the value.

Closes Q238

Reopens T16311

Test Plan:
* Comment on a task which you are not yet subscribed to via the web interface.
* Follow test plan of original rPbabeed68 for the Conduit part.

Reviewers: O1 Blessed Committers, valerio.bozzolan, avivey

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16311

Differential Revision: https://we.phorge.it/D26741

-14
-14
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 602 602 case PhabricatorTransactions::TYPE_COMMENT: 603 603 return null; 604 604 case PhabricatorTransactions::TYPE_SUBSCRIBERS: 605 - $new_value = $xaction->getNewValue(); 606 - foreach ($new_value as $subscribers) { 607 - foreach ($subscribers as $key => $subscriber) { 608 - if (phid_get_type($key) === 609 - PhabricatorPHIDConstants::PHID_TYPE_UNKNOWN) { 610 - throw new Exception( 611 - pht( 612 - 'Subscriber transactions must be existing PHIDs or '. 613 - 'usernames (found key "%s" on transaction of type "%s").', 614 - $key, 615 - $type)); 616 - } 617 - } 618 - } 619 605 return $this->getPHIDTransactionNewValue($xaction); 620 606 case PhabricatorTransactions::TYPE_VIEW_POLICY: 621 607 case PhabricatorTransactions::TYPE_EDIT_POLICY: