{"record":{"id":"411f65437650448e","repo":"phacility/phabricator","slug":"when-accepting-a-revision-you-must-accept-on-beha","errorCode":null,"errorMessage":"When accepting a revision, you must accept on behalf of at least one reviewer.","messagePattern":"When accepting a revision, you must accept on behalf of at least one reviewer\\.","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php","lineNumber":195,"sourceCode":"          pht(\n            'You can not accept this revision because you are the revision '.\n            'author. You can only accept revisions you do not own. You can '.\n            'change this behavior by adjusting the \"%s\" setting in Config.',\n            $config_key));\n      }\n    }\n\n    if ($this->isViewerFullyAccepted($object, $viewer)) {\n      throw new Exception(\n        pht(\n          'You can not accept this revision because you have already '.\n          'accepted it.'));\n    }\n  }\n\n  protected function validateOptionValue($object, $actor, array $value) {\n    if (!$value) {\n      throw new Exception(\n        pht(\n          'When accepting a revision, you must accept on behalf of at '.\n          'least one reviewer.'));\n    }\n\n    // NOTE: We're including reviewers who have already been accepted in this\n    // check. Legitimate users may race one another to accept on behalf of\n    // packages. If we get a form submission which includes a reviewer which\n    // someone has already accepted, that's fine. See T12757.\n\n    list($options) = $this->getActionOptions($actor, $object, true);\n    foreach ($value as $phid) {\n      if (!isset($options[$phid])) {\n        throw new Exception(\n          pht(\n            'Reviewer \"%s\" is not a valid reviewer which you have authority '.\n            'to accept on behalf of.',\n            $phid));","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php#L177-L213","documentation":"Input guard inside DifferentialRevisionAcceptTransaction::validateOptionValue: the 'accept on behalf of' value submitted with the transaction is empty. The accept workflow requires acting for at least one specific reviewer (yourself or a package/project reviewer you have authority over); an empty selection gives the transaction no reviewer to attach the accept to, so it is rejected before any effects are applied.","triggerScenarios":"Thrown at src/applications/differential/xaction/DifferentialRevisionAcceptTransaction.php:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select at least one reviewer (yourself, another reviewer, or a package/project you have authority over) when submitting the accept action","If the action form lost your selection, reload the revision page and resubmit with the reviewer checkbox checked","For API/Conduit callers, ensure the 'accept' value parameter is a non-empty list of reviewer PHIDs"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","contentChangedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}