Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the tests for value.
  • Loading branch information
jrbasso committed May 6, 2011
1 parent 24bf56b commit 3231755
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Cake/Model/Datasource/Database/Mssql.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3231755

Please sign in to comment.