summaryrefslogtreecommitdiffstats
path: root/lib/app.php
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2012-09-18 16:51:55 +0100
committerSam Tuke <samtuke@owncloud.com>2012-09-18 16:55:03 +0100
commit9df403f051354b24da61b12f6446d10d899f05f7 (patch)
treea05b04dacef9e78497a77945e28ce83f0e578be4 /lib/app.php
parent842cd57fa780029e60d0fb8094d4dd794bb33cb7 (diff)
downloadnextcloud-server-9df403f051354b24da61b12f6446d10d899f05f7.tar.gz
nextcloud-server-9df403f051354b24da61b12f6446d10d899f05f7.zip
Added failsafes for retrieving remote apps on settings->apps page, in case categories or app data are not found
Diffstat (limited to 'lib/app.php')
-rwxr-xr-xlib/app.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/app.php b/lib/app.php
index 328095a90d2..38ba4bcdc88 100755
--- a/lib/app.php
+++ b/lib/app.php
@@ -563,7 +563,12 @@ class OC_App{
if ( is_array( $catagoryNames ) ) {
- $categories = array_keys( $catagoryNames );
+ // Check that categories of apps were retrieved correctly
+ if ( ! $categories = array_keys( $catagoryNames ) ) {
+
+ return false;
+
+ }
$page = 0;
@@ -589,7 +594,15 @@ class OC_App{
}
- return $app1;
+ if ( empty( $app1 ) ) {
+
+ return false;
+
+ } else {
+
+ return $app1;
+
+ }
}
/**