Skip to content
Snippets Groups Projects
Commit 533a2361 authored by Morris Jobke's avatar Morris Jobke
Browse files

Handle returned null value in app level code

* getApplication on OCSClient can also return null
  this is now handled properly
* fixes #17587
parent 1006ec56
No related branches found
No related tags found
No related merge requests found
......@@ -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'];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment