write error message to log file in case insert to file cache failed - took hours to find that the insert failed :-(

remotes/origin/stable6
Thomas Mueller 12 years ago
parent 569c7ab138
commit 9d4d399aa3
  1. 5
      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');
}

Loading…
Cancel
Save