From c08e85bf7029265037a0838f9a537bb8fa7e954f Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind1991@gmail.com>
Date: Mon, 15 Aug 2011 16:01:41 +0200
Subject: [PATCH] dont throw errors if we cant connect to the apps repository

---
 settings/apps.php | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/settings/apps.php b/settings/apps.php
index e41a0cbf8d..05da425976 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -46,16 +46,19 @@ foreach($registeredApps as $app){
 	}
 }
 
-$categories=array_keys(OC_OCSClient::getCategories());
-$externalApps=OC_OCSClient::getApplications($categories);
-foreach($externalApps as $app){
-	$apps[]=array(
-		'name'=>$app['name'],
-		'id'=>$app['id'],
-		'active'=>false,
-		'description'=>$app['description'],
-		'author'=>$app['personid'],
-	);
+$catagoryNames=OC_OCSClient::getCategories();
+if(is_array($catagoryNames)){
+	$categories=array_keys($catagoryNames);
+	$externalApps=OC_OCSClient::getApplications($categories);
+	foreach($externalApps as $app){
+		$apps[]=array(
+			'name'=>$app['name'],
+			'id'=>$app['id'],
+			'active'=>false,
+			'description'=>$app['description'],
+			'author'=>$app['personid'],
+		);
+	}
 }
 
 
-- 
GitLab