From fd134e7f87babb3bc8ad26df905983c88be61292 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 3 Aug 2016 14:04:39 +1000 Subject: [PATCH] Update for 'Suppress DB updates when values are not changed' --- modules/orm/classes/Kohana/ORM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/orm/classes/Kohana/ORM.php b/modules/orm/classes/Kohana/ORM.php index 341b5b0..450fd4a 100644 --- a/modules/orm/classes/Kohana/ORM.php +++ b/modules/orm/classes/Kohana/ORM.php @@ -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]);