Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing issues with unicode quoting.

  • Loading branch information...
commit 3169c5a1e78f4ab272fa8f51ae73655fa538d2d6 1 parent 9ab2ec7
@markstory markstory authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Model/Datasource/Database/Sqlserver.php
View
6 lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -558,6 +558,8 @@ public function renderStatement($type, $data) {
public function value($data, $column = null) {
if (is_array($data) || is_object($data)) {
return parent::value($data, $column);
+ } elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {
+ return $data;
}
if (empty($column)) {
@@ -658,8 +660,10 @@ public function buildColumn($column) {
} else {
$result = str_replace('DEFAULT NULL', 'NULL', $result);
}
- } else if (array_keys($column) == array('type', 'name')) {
+ } elseif (array_keys($column) == array('type', 'name')) {
$result .= ' NULL';
+ } elseif (strpos($result, "DEFAULT N'")) {
+ $result = str_replace("DEFAULT N'", "DEFAULT '", $result);
}
return $result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.