jonathangeiger / kohana-jelly

See the link below for the most up-to-date code

Home Page:https://github.com/creatoro/jelly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serialized field and null values

Neurergus opened this issue · comments

Hi,

I have a serialized field with the options allow_null and convert_empty set to TRUE, but even if I set the field to null, it saves something like "N;" (php serialized representation of null, I suppose :S).

I've modified the save function to temporarily circumvent this:

public function save($model, $value, $loaded)
{
    return $value ? @serialize($value) : $value;
}

At least it's working for my case :-)

Should closed by 1481e29