Permalink
Browse files

Fixed the tests for value.

  • Loading branch information...
1 parent 24bf56b commit 3231755d63aec0ce841ed24c4eb158b5415b70ce @jrbasso jrbasso committed Apr 29, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Cake/Model/Datasource/Database/Mssql.php
View
6 lib/Cake/Model/Datasource/Database/Mssql.php
@@ -232,6 +232,12 @@ function describe($model) {
function value($data, $column = null, $safe = false) {
$parent = parent::value($data, $column, $safe);
+ if ($column === 'float' && strpos($data, '.') !== false) {
+ return rtrim($data, '0');
+ }
+ if ($parent === "''") {
+ return 'NULL';
+ }
if ($parent != null) {
return $parent;
}

0 comments on commit 3231755

Please sign in to comment.