Commit 86fe74d5 authored by subzero2000's avatar subzero2000

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().
parent b68a791b
......@@ -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;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment