diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-13 14:28:14 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-13 15:34:00 +0200 |
commit | 533a23611a09d83baa0e909db30a68f9edae3183 (patch) | |
tree | 674677812b6fdb75b2e9b00ba0799c176c53901d /settings | |
parent | 1006ec56ceb2c7c5bc14a5401d46767cb4b72e6c (diff) | |
download | nextcloud-server-533a23611a09d83baa0e909db30a68f9edae3183.tar.gz nextcloud-server-533a23611a09d83baa0e909db30a68f9edae3183.zip |
Handle returned null value in app level code
* getApplication on OCSClient can also return null
this is now handled properly
* fixes #17587
Diffstat (limited to 'settings')
-rw-r--r-- | settings/controller/appsettingscontroller.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/controller/appsettingscontroller.php b/settings/controller/appsettingscontroller.php index 6803985d5db..f5cb043da20 100644 --- a/settings/controller/appsettingscontroller.php +++ b/settings/controller/appsettingscontroller.php @@ -173,7 +173,7 @@ class AppSettingsController extends Controller { if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) { $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], \OC_Util::getVersion()); - if(array_key_exists('level', $remoteAppEntry)) { + if(is_array($remoteAppEntry) && array_key_exists('level', $remoteAppEntry)) { $apps[$key]['level'] = $remoteAppEntry['level']; } } @@ -189,7 +189,7 @@ class AppSettingsController extends Controller { if(!array_key_exists('level', $app) && array_key_exists('ocsid', $app)) { $remoteAppEntry = $this->ocsClient->getApplication($app['ocsid'], \OC_Util::getVersion()); - if(array_key_exists('level', $remoteAppEntry)) { + if(is_array($remoteAppEntry) && array_key_exists('level', $remoteAppEntry)) { $apps[$key]['level'] = $remoteAppEntry['level']; } } |