diff --git a/VERSION.txt b/VERSION.txt index 23a88bbf8..231a98f0e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -0.10.4.1695_beta \ No newline at end of file +0.10.4.1697_beta \ No newline at end of file diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index e7e537f85..0a179ce7d 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -800,9 +800,15 @@ class Model extends Object continue; } $fields[] = $x; + if($y === NULL) + { + $values[] = 'NULL'; + } + else + { $values[] = (ini_get('magic_quotes_gpc') == 1) ? $this->db->prepare(stripslashes($y)) : $this->db->prepare($y); - + } if($x == $this->primaryKey && !is_numeric($y)) { $newID = $y;