{"record":{"id":"4176f3b97f1d34c8","repo":"Seldaek/monolog","slug":"you-tried-to-pop-from-an-empty-processor-stack","errorCode":null,"errorMessage":"You tried to pop from an empty processor stack.","messagePattern":"You tried to pop from an empty processor stack\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"src/Monolog/Handler/ProcessableHandlerTrait.php","lineNumber":47,"sourceCode":"    protected array $processors = [];\n\n    /**\n     * @inheritDoc\n     */\n    public function pushProcessor(callable $callback): HandlerInterface\n    {\n        array_unshift($this->processors, $callback);\n\n        return $this;\n    }\n\n    /**\n     * @inheritDoc\n     */\n    public function popProcessor(): callable\n    {\n        if (\\count($this->processors) === 0) {\n            throw new \\LogicException('You tried to pop from an empty processor stack.');\n        }\n\n        return array_shift($this->processors);\n    }\n\n    protected function processRecord(LogRecord $record): LogRecord\n    {\n        foreach ($this->processors as $processor) {\n            $record = $processor($record);\n        }\n\n        return $record;\n    }\n\n    protected function resetProcessors(): void\n    {\n        foreach ($this->processors as $processor) {\n            if ($processor instanceof ResettableInterface) {","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/Seldaek/monolog/blob/57eb1028342134e701e77c617565d51b6e5a2a53/src/Monolog/Handler/ProcessableHandlerTrait.php#L29-L65","documentation":"Error \"You tried to pop from an empty processor stack.\" thrown in Seldaek/monolog.","triggerScenarios":"Thrown at src/Monolog/Handler/ProcessableHandlerTrait.php:47 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"}