]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix upgrade error for instances not upgraded from 4.5
authorArthur Schiwon <blizzz@owncloud.com>
Tue, 2 Apr 2013 14:25:12 +0000 (16:25 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Tue, 2 Apr 2013 14:25:12 +0000 (16:25 +0200)
core/ajax/update.php

index e40d0def4e43806ff38721992d0b16b08de11d5a..3154c2e305c27752c01f54755c3784e8e6a1f938 100644 (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;