Merge pull request #2254 from owncloud/fixing-mssql-utf8-and-insert-empty-string-master
Fixing mssql utf8 and insert empty string master
This commit is contained in:
commit
2e9d641337
|
@ -292,8 +292,10 @@ class OC_DB {
|
|||
'username' => $user,
|
||||
'password' => $pass,
|
||||
'hostspec' => $host,
|
||||
'database' => $name
|
||||
'database' => $name,
|
||||
'charset' => 'UTF-8'
|
||||
);
|
||||
$options['portability'] = $options['portability'] - MDB2_PORTABILITY_EMPTY_TO_NULL;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
|
|
@ -203,7 +203,10 @@ class Cache {
|
|||
|
||||
$query = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache`(' . implode(', ', $queryParts) . ')'
|
||||
. ' VALUES(' . implode(', ', $valuesPlaceholder) . ')');
|
||||
$query->execute($params);
|
||||
$result = $query->execute($params);
|
||||
if (\MDB2::isError($result)) {
|
||||
\OCP\Util::writeLog('cache', 'Insert to cache failed: '.$result, \OCP\Util::ERROR);
|
||||
}
|
||||
|
||||
return (int)\OC_DB::insertid('*PREFIX*filecache');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue