codeigniter-base-model
codeigniter-base-model copied to clipboard
Add isset conditional for serialize observer
Without a conditional to serialize, then on update a column is created (empty), serialized, and overrides previously stored data.
I was having some serialized data override while trying to update another column.
If a serialized row is not set for update, then the serialize observer creates an empty column to serialize the overrides the column that is already stored in the database.