From 8fbcf393c0ee46ebd8cbc4e4c655d4fbad7c206c Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 22 Feb 2018 14:22:35 +0100 Subject: [PATCH] method returns array null causes exceptions down the road Signed-off-by: Arthur Schiwon --- lib/private/App/AppManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index 4bf15c23fab96..a87e901639c84 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -351,7 +351,7 @@ public function getAppsNeedingUpgrade($version) { * @param null $lang * @return array app info */ - public function getAppInfo(string $appId, bool $path = false, $lang = null) { + public function getAppInfo(string $appId, bool $path = false, $lang = null): array { if ($path) { $file = $appId; } else { @@ -361,7 +361,7 @@ public function getAppInfo(string $appId, bool $path = false, $lang = null) { try { $appPath = $this->getAppPath($appId); } catch (AppPathNotFoundException $e) { - return null; + return []; } $file = $appPath . '/appinfo/info.xml'; }