{"record":{"id":"d3b57af520ea2a78","repo":"phalcon/cphalcon","slug":"this-object-cannot-be-serialized","errorCode":null,"errorMessage":"This object cannot be serialized","messagePattern":"This object cannot be serialized","errorType":"exception","errorClass":"Phalcon\\Logger\\Exceptions\\SerializationFailed","httpStatus":null,"severity":"error","filePath":"phalcon/Logger/Adapter/AbstractAdapter.zep","lineNumber":74,"sourceCode":"     * Throwing from a destructor is fatal during script shutdown, so an open\n     * transaction is auto-committed here (flushing the queued items) rather\n     * than throwing.\n     */\n    public function __destruct()\n    {\n        if this->inTransaction {\n            this->commit();\n        }\n\n        this->close();\n    }\n\n    /**\n     * Prevent serialization\n     */\n    public function __serialize() -> array\n    {\n        throw new SerializationFailed();\n    }\n\n    /**\n     * Prevent unserialization\n     */\n    public function __unserialize(array data) -> void\n    {\n        throw new DeserializationFailed();\n    }\n\n    /**\n     * Adds a message to the queue\n     *\n     * @param Item $item\n     *\n     * @return AdapterInterface\n     */\n    public function add(<Item> item) -> <AdapterInterface>","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Logger/Adapter/AbstractAdapter.zep#L56-L92","documentation":"Error \"This object cannot be serialized\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Logger/Adapter/AbstractAdapter.zep:74 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":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}