{"record":{"id":"0948b291ba1e782e","repo":"phalcon/cphalcon","slug":"the-option-value-is-required","errorCode":null,"errorMessage":"The option 'value' is required","messagePattern":"The option 'value' is required","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Behavior\\Exceptions\\MissingRequiredOption","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Behavior/SoftDelete.zep","lineNumber":44,"sourceCode":"{\n    /**\n     * Listens for notifications from the models manager\n     */\n    public function notify( string type, <ModelInterface> model)\n    {\n        var options, value, field, updateModel, message, modelsManager, metaData;\n\n        if type !== \"beforeDelete\" {\n            return;\n        }\n\n        let options = this->getOptions();\n\n        /**\n         * 'value' is the value to be updated instead of delete the record\n         */\n        if unlikely !fetch value, options[\"value\"] {\n            throw new MissingRequiredOption(\"value\");\n        }\n\n        /**\n         * 'field' is the attribute to be updated instead of delete the record\n         */\n        if unlikely !fetch field, options[\"field\"] {\n            throw new MissingRequiredOption(\"field\");\n        }\n\n        /**\n         * Skip the current operation\n         */\n        model->skipOperation(true);\n\n        /**\n         * If the record is already flagged as 'deleted' we don't delete it again\n         */\n        if model->readAttribute(field) === value {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Behavior/SoftDelete.zep#L26-L62","documentation":"Error \"The option 'value' is required\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Behavior/SoftDelete.zep:44 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"}