Handle returned null value in app level code
* getApplication on OCSClient can also return null this is now handled properly * fixes #17587
This commit is contained in:
parent
1006ec56ce
commit
533a23611a
1 changed files with 2 additions and 2 deletions
|
@ -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'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue