]> source.dussan.org Git - nextcloud-server.git/commitdiff
Cast "isFeatured" to "featured" 2221/head
authorLukas Reschke <lukas@statuscode.ch>
Mon, 21 Nov 2016 20:34:37 +0000 (21:34 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 21 Nov 2016 20:34:37 +0000 (21:34 +0100)
The appstore returns a "isFeatured" in the current API revision. We need to cast this thus.

Fixes the following error log message when opening the tab "Customization":

> Undefined index: featured at /media/psf/stable9/settings/Controller/AppSettingsController.php#233

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
settings/Controller/AppSettingsController.php

index b668c5cfb38b8af823c452de64efd09b5f9c133d..8d12b2a85a2b866aff8aef4e38eb120e815070b4 100644 (file)
@@ -154,6 +154,9 @@ class AppSettingsController extends Controller {
                $formattedApps = [];
                $apps = $this->appFetcher->get();
                foreach($apps as $app) {
+                       if (isset($app['isFeatured'])) {
+                               $app['featured'] = $app['isFeatured'];
+                       }
 
                        // Skip all apps not in the requested category
                        $isInCategory = false;