From 22c8194cc8fde88957dbc8c6d9e253fac3c637bb Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 2 Apr 2013 16:25:12 +0200 Subject: [PATCH] fix upgrade error for instances not upgraded from 4.5 --- core/ajax/update.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/ajax/update.php b/core/ajax/update.php index e40d0def4e4..3154c2e305c 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -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; -- 2.39.5