write error message to log file in case insert to file cache failed - took hours to find that the insert failed :-(
This commit is contained in:
parent
569c7ab138
commit
9d4d399aa3
1 changed files with 4 additions and 1 deletions
5
lib/files/cache/cache.php
vendored
5
lib/files/cache/cache.php
vendored
|
@ -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 a new issue