jonathangeiger / kohana-jelly

See the link below for the most up-to-date code
https://github.com/creatoro/jelly
MIT License
146 stars 34 forks source link

Serialized fields and NULL values #181

Open ashishpadave opened 13 years ago

ashishpadave commented 13 years ago

If a field value is NULL its stored in the DB as "N;". When this is retrieved back from the DB the value returned is of type String with value "N;" instead of NULL.

Chnaging the condition in the set function to

 if ($value === NULL OR ($this->null AND empty($value)) OR @unserialize($value)===NULL) 
fixes the bug