{"record":{"id":"fe9c276e94d0f49b","repo":"phacility/phabricator","slug":"trigger-ruleset-is-corrupt-rule-at-index-s-i","errorCode":null,"errorMessage":"Trigger ruleset is corrupt: rule (at index \"%s\") is not a valid rule specification: %s","messagePattern":"Trigger ruleset is corrupt: rule \\(at index \"(.+?)\"\\) is not a valid rule specification: (.+?)","errorType":"exception","errorClass":"PhabricatorProjectTriggerCorruptionException","httpStatus":null,"severity":"error","filePath":"src/applications/project/storage/PhabricatorProjectTrigger.php","lineNumber":157,"sourceCode":"    foreach ($list as $key => $rule) {\n      if (!is_array($rule)) {\n        throw new PhabricatorProjectTriggerCorruptionException(\n          pht(\n            'Trigger ruleset is corrupt: rule (at index \"%s\") should be a '.\n            'rule specification, but is actually \"%s\".',\n            $key,\n            phutil_describe_type($rule)));\n      }\n\n      try {\n        PhutilTypeSpec::checkMap(\n          $rule,\n          array(\n            'type' => 'string',\n            'value' => 'wild',\n          ));\n      } catch (PhutilTypeCheckException $ex) {\n        throw new PhabricatorProjectTriggerCorruptionException(\n          pht(\n            'Trigger ruleset is corrupt: rule (at index \"%s\") is not a '.\n            'valid rule specification: %s',\n            $key,\n            $ex->getMessage()));\n      }\n\n      $record = id(new PhabricatorProjectTriggerRuleRecord())\n        ->setType(idx($rule, 'type'))\n        ->setValue(idx($rule, 'value'));\n\n      if (!isset($rule_map[$record->getType()])) {\n        if (!$allow_invalid) {\n          throw new PhabricatorProjectTriggerCorruptionException(\n            pht(\n              'Trigger ruleset is corrupt: rule type \"%s\" is unknown.',\n              $record->getType()));\n        }","sourceCodeStart":139,"sourceCodeEnd":175,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/project/storage/PhabricatorProjectTrigger.php#L139-L175","documentation":"Error \"Trigger ruleset is corrupt: rule (at index \"%s\") is not a valid rule specification: %s\" thrown in phacility/phabricator.","triggerScenarios":"Thrown at src/applications/project/storage/PhabricatorProjectTrigger.php:157 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"}