summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/app.php17
-rw-r--r--lib/ocsclient.php2
2 files changed, 16 insertions, 3 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;
+
+ }
}
/**
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index 8596ea0b3c7..6428a883679 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -53,7 +53,7 @@ class OC_OCSClient{
/**
* @brief Get all the categories from the OCS server
* @returns array with category ids
- *
+ * @note returns NULL if config value appstoreenabled is set to false
* This function returns a list of all the application categories on the OCS server
*/
public static function getCategories() {