Commit 4b95d050 authored by dbrewer's avatar dbrewer

Merged r3550 from 0.9 branch to trunk.

parent 04e4a9ce
......@@ -445,7 +445,8 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
/**
* cleanData
* leaves the $data array only with values whose key is a field inside this
* record and returns the values that where removed from $data.
* record and returns the values that were removed from $data. Also converts
* any values of 'null' to objects of type Doctrine_Null.
*
* @param array $data data array to be cleaned
* @return array $tmp values cleaned from data
......@@ -459,6 +460,8 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
foreach ($fieldNames as $fieldName) {
if (isset($tmp[$fieldName])) {
$data[$fieldName] = $tmp[$fieldName];
} else if (array_key_exists($fieldName, $tmp)) {
$data[$fieldName] = self::$_null;
} else if (!isset($this->_data[$fieldName])) {
$data[$fieldName] = self::$_null;
}
......
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