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:
Morris Jobke 2015-07-13 14:28:14 +02:00
parent 1006ec56ce
commit 533a23611a

View file

@ -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'];
}
}