{"record":{"id":"d88a33bce1e06934","repo":"phalcon/cphalcon","slug":"there-is-an-active-transaction","errorCode":null,"errorMessage":"There is an active transaction","messagePattern":"There is an active transaction","errorType":"exception","errorClass":"Phalcon\\Logger\\Exceptions\\TransactionAlreadyActive","httpStatus":null,"severity":"error","filePath":"phalcon/Logger/Adapter/AbstractAdapter.zep","lineNumber":117,"sourceCode":"                unset(this->queue[firstKey]);\n            }\n        }\n\n        let this->queue[] = item;\n\n        return this;\n    }\n\n    /**\n     * Starts a transaction\n     *\n     * @return AdapterInterface\n     * @throws TransactionAlreadyActive\n     */\n    public function begin() -> <AdapterInterface>\n    {\n        if this->inTransaction {\n            throw new TransactionAlreadyActive();\n        }\n\n        let this->inTransaction = true;\n\n        return this;\n    }\n\n    /**\n     * Closes the logger\n     *\n     * @return bool\n     */\n    abstract public function close() -> bool;\n\n    /**\n     * Commits the internal transaction\n     *\n     * @return AdapterInterface","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Logger/Adapter/AbstractAdapter.zep#L99-L135","documentation":"Thrown by Logger Adapter::begin when begin() is called while inTransaction is already true — nested transactions on the same adapter are not supported. Commit or rollback the active transaction before starting a new one.","triggerScenarios":"Thrown at phalcon/Logger/Adapter/AbstractAdapter.zep:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Commit or rollback the current transaction before starting a new one","Check inTransaction() before calling begin()"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","contentChangedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}