diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 15:32:28 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-03-12 15:39:29 +0100 |
commit | 9d4d399aa3296c40daed863a7ed31601c1c724c3 (patch) | |
tree | e35bb13c5c6a7f5b9ade7f78326d257761337b0d /lib/files/cache/cache.php | |
parent | 569c7ab1384c9d01255ae7bc2075edf11508d4a6 (diff) | |
download | nextcloud-server-9d4d399aa3296c40daed863a7ed31601c1c724c3.tar.gz nextcloud-server-9d4d399aa3296c40daed863a7ed31601c1c724c3.zip |
write error message to log file in case insert to file cache failed - took hours to find that the insert failed :-(
Diffstat (limited to 'lib/files/cache/cache.php')
-rw-r--r-- | lib/files/cache/cache.php | 5 |
1 files changed, 4 insertions, 1 deletions
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'); } |