From 07f510692cfa6dfb8357b7eb66e897a03fd20e3f Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 21 Apr 2013 00:08:55 +0200
Subject: [PATCH] Ensure we don't throw an exception before we can upgrade to
 the new backgroundjob system

---
 lib/base.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/base.php b/lib/base.php
index fda65a221c..631f934154 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -561,7 +561,11 @@ class OC {
 	 */
 	public static function registerCacheHooks() {
 		// register cache cleanup jobs
-		\OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC');
+		try { //if this is executed before the upgrade to the new backgroundjob system is completed it will throw an exception
+			\OCP\BackgroundJob::registerJob('OC_Cache_FileGlobalGC');
+		} catch (Exception $e) {
+
+		}
 		OC_Hook::connect('OC_User', 'post_login', 'OC_Cache_File', 'loginListener');
 	}
 
-- 
GitLab