summaryrefslogtreecommitdiffstats
path: root/lib/files/cache/cache.php
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 15:32:28 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-03-12 15:39:29 +0100
commit9d4d399aa3296c40daed863a7ed31601c1c724c3 (patch)
treee35bb13c5c6a7f5b9ade7f78326d257761337b0d /lib/files/cache/cache.php
parent569c7ab1384c9d01255ae7bc2075edf11508d4a6 (diff)
downloadnextcloud-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.php5
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');
}