diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-03-12 11:52:40 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-03-12 11:52:40 -0700 |
commit | 2e9d641337be76051d46dba793446a65f7ee5a2a (patch) | |
tree | ea0b910676100aac831c12bad9df04dcfcd2999e /lib | |
parent | 84d895dc87fc5e4c91ee3a31bd6e114e50350db7 (diff) | |
parent | ec1685311258935548512be3698b59512b084de5 (diff) | |
download | nextcloud-server-2e9d641337be76051d46dba793446a65f7ee5a2a.tar.gz nextcloud-server-2e9d641337be76051d46dba793446a65f7ee5a2a.zip |
Merge pull request #2254 from owncloud/fixing-mssql-utf8-and-insert-empty-string-master
Fixing mssql utf8 and insert empty string master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/db.php | 6 | ||||
-rw-r--r-- | lib/files/cache/cache.php | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/db.php b/lib/db.php index 347deac8519..9699b216f6f 100644 --- a/lib/db.php +++ b/lib/db.php @@ -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; diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index f288919df74..1ff66f11f18 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -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'); } |