Update for 'Suppress DB updates when values are not changed'
This commit is contained in:
parent
e3bfa19f3d
commit
fd134e7f87
@ -812,7 +812,7 @@ class Kohana_ORM extends Model implements serializable {
|
||||
|
||||
// If the replacement value is the same as the original value, we dont need to update.
|
||||
// @note This assumes that the value returned from the DB is always a string.
|
||||
if (array_key_exists($column, $this->_original_values) AND (string)$value === $this->_original_values[$column] AND array_key_exists($column, $this->_changed))
|
||||
if (array_key_exists($column, $this->_original_values) AND is_string($value) AND (string)$value === $this->_original_values[$column] AND array_key_exists($column, $this->_changed))
|
||||
{
|
||||
unset($this->_changed[$column]);
|
||||
|
||||
|
Reference in New Issue
Block a user