Cast "isFeatured" to "featured"

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>
This commit is contained in:
Lukas Reschke 2016-11-21 21:34:37 +01:00
parent 206ef51eac
commit e2bfce0d26
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
1 changed files with 3 additions and 0 deletions

View 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;