phalcon/cphalcon · error · Phalcon\Mvc\Model\Behavior\Exceptions\MissingRequiredOption

The option 'value' is required

Error message

The option 'value' is required

What it means

Error "The option 'value' is required" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Behavior/SoftDelete.zep:44

{
    /**
     * Listens for notifications from the models manager
     */
    public function notify( string type, <ModelInterface> model)
    {
        var options, value, field, updateModel, message, modelsManager, metaData;

        if type !== "beforeDelete" {
            return;
        }

        let options = this->getOptions();

        /**
         * 'value' is the value to be updated instead of delete the record
         */
        if unlikely !fetch value, options["value"] {
            throw new MissingRequiredOption("value");
        }

        /**
         * 'field' is the attribute to be updated instead of delete the record
         */
        if unlikely !fetch field, options["field"] {
            throw new MissingRequiredOption("field");
        }

        /**
         * Skip the current operation
         */
        model->skipOperation(true);

        /**
         * If the record is already flagged as 'deleted' we don't delete it again
         */
        if model->readAttribute(field) === value {

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Behavior/SoftDelete.zep:44 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/0948b291ba1e782e. Report an issue: GitHub.