{"record":{"id":"a06470ca8029e58a","repo":"Seldaek/monolog","slug":"the-first-argument-of-the-grouphandler-must-be-an","errorCode":null,"errorMessage":"The first argument of the GroupHandler must be an array of HandlerInterface instances.","messagePattern":"The first argument of the GroupHandler must be an array of HandlerInterface instances\\.","errorType":"exception","errorClass":"InvalidArgumentException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/GroupHandler.php","lineNumber":41,"sourceCode":"class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface\n{\n    use ProcessableHandlerTrait;\n\n    /** @var HandlerInterface[] */\n    protected array $handlers;\n    protected bool $bubble;\n\n    /**\n     * @param HandlerInterface[] $handlers Array of Handlers.\n     * @param bool               $bubble   Whether the messages that are handled can bubble up the stack or not\n     *\n     * @throws \\InvalidArgumentException if an unsupported handler is set\n     */\n    public function __construct(array $handlers, bool $bubble = true)\n    {\n        foreach ($handlers as $handler) {\n            if (!$handler instanceof HandlerInterface) {\n                throw new \\InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.');\n            }\n        }\n\n        $this->handlers = $handlers;\n        $this->bubble = $bubble;\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function isHandling(LogRecord $record): bool\n    {\n        foreach ($this->handlers as $handler) {\n            if ($handler->isHandling($record)) {\n                return true;\n            }\n        }\n","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/GroupHandler.php#L23-L59","documentation":"Error \"The first argument of the GroupHandler must be an array of HandlerInterface instances.\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/GroupHandler.php:41 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":"57eb1028342134e701e77c617565d51b6e5a2a53","analyzedAt":"2026-08-17T02:36:30.259Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}