1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Little fix for cleanData method

This commit is contained in:
zYne 2006-08-25 17:17:55 +00:00
parent 46f2cbe426
commit f547396124

View File

@ -270,12 +270,14 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
case "object":
if($tmp[$name] !== self::$null) {
if( ! is_array($tmp[$name] && ! is_object($tmp[$name]))
if(is_string($tmp[$name])) {
$value = unserialize($tmp[$name]);
if($value === false)
throw new Doctrine_Exception("Unserialization of $name failed. ".var_dump($tmp[$name],true));
if($value === false)
throw new Doctrine_Exception("Unserialization of $name failed. ".var_dump($tmp[$name],true));
} else
$value = $tmp[$name];
$this->data[$name] = $value;
}
break;