fix upgrade error for instances not upgraded from 4.5

This commit is contained in:
Arthur Schiwon 2013-04-02 16:25:12 +02:00
parent 8231f657d9
commit 22c8194cc8
1 changed files with 9 additions and 5 deletions

View File

@ -36,11 +36,15 @@ if (OC::checkUpgrade(false)) {
* @param UpdateWatcher $watcher
*/
function __doFileCacheUpgrade($watcher) {
$query = \OC_DB::prepare('
SELECT DISTINCT user
FROM`*PREFIX*fscache`
');
$result = $query->execute();
try {
$query = \OC_DB::prepare('
SELECT DISTINCT user
FROM`*PREFIX*fscache`
');
$result = $query->execute();
} catch (\Exception $e) {
return;
}
$users = $result->fetchAll();
if(count($users) == 0) {
return;