mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing issues with unicode quoting.
This commit is contained in:
parent
9ab2ec7d49
commit
3169c5a1e7
1 changed files with 5 additions and 1 deletions
|
@ -558,6 +558,8 @@ class Sqlserver extends DboSource {
|
|||
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 @@ class Sqlserver extends DboSource {
|
|||
} 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue