{"record":{"id":"695d694cb8648c0e","repo":"phacility/phabricator","slug":"invalid-commit-phid-s","errorCode":null,"errorMessage":"Invalid commit PHID \"%s\"!","messagePattern":"Invalid commit PHID \"(.+?)\"!","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/diffusion/controller/DiffusionInlineCommentController.php","lineNumber":27,"sourceCode":"\n  protected function newContainerObject() {\n    return $this->loadCommit();\n  }\n\n  private function getCommitPHID() {\n    return $this->getRequest()->getURIData('phid');\n  }\n\n  private function loadCommit() {\n    $viewer = $this->getViewer();\n    $commit_phid = $this->getCommitPHID();\n\n    $commit = id(new DiffusionCommitQuery())\n      ->setViewer($viewer)\n      ->withPHIDs(array($commit_phid))\n      ->executeOne();\n    if (!$commit) {\n      throw new Exception(pht('Invalid commit PHID \"%s\"!', $commit_phid));\n    }\n\n    return $commit;\n  }\n\n  protected function createComment() {\n    $commit = $this->loadCommit();\n\n    // TODO: Write a real PathQuery object?\n    $path_id = $this->getChangesetID();\n    $path = queryfx_one(\n      id(new PhabricatorRepository())->establishConnection('r'),\n      'SELECT path FROM %T WHERE id = %d',\n      PhabricatorRepository::TABLE_PATH,\n      $path_id);\n    if (!$path) {\n      throw new Exception(pht('Invalid path ID!'));\n    }","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/diffusion/controller/DiffusionInlineCommentController.php#L9-L45","documentation":"Error \"Invalid commit PHID \"%s\"!\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/diffusion/controller/DiffusionInlineCommentController.php:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}