Added support for gzip and enum types that was missing so when
Doctrine_Record::unserialize() calls Doctrine_Record::cleanData(), the data for gzip and enum types is correct. Fixes #322. Also, minor formatting cleanup in Doctrine_Record::serialize().
This commit is contained in:
parent
b68a791bf7
commit
86fe74d58e
1 changed files with 8 additions and 2 deletions
|
@ -523,10 +523,16 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
|
|||
unset($vars['_data'][$k]);
|
||||
} else {
|
||||
switch ($this->_table->getTypeOf($k)) {
|
||||
case "array":
|
||||
case "object":
|
||||
case 'array':
|
||||
case 'object':
|
||||
$vars['_data'][$k] = serialize($vars['_data'][$k]);
|
||||
break;
|
||||
case 'gzip':
|
||||
$vars['_data'][$k] = gzcompress($vars['_data'][$k]);
|
||||
break;
|
||||
case 'enum':
|
||||
$vars['_data'][$k] = $this->_table->enumIndex($k, $vars['_data'][$k]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue