Skip to content

Commit 02b4486

Browse files
committed
fix: early error in appinfo json parsing
Signed-off-by: Anupam Kumar <[email protected]>
1 parent 53fcce3 commit 02b4486

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Service/ExAppService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo, ?
265265
$extractedDir = '';
266266
if ($jsonInfo !== null) {
267267
$appInfo = json_decode($jsonInfo, true);
268-
if ($appInfo === false) {
269-
return ['error' => 'Invalid app info JSON'];
268+
if (!$appInfo) {
269+
return ['error' => 'Invalid app info provided in JSON format'];
270270
}
271271
# fill 'id' if it is missing(this field was called `appid` in previous versions in json)
272272
$appInfo['id'] = $appInfo['id'] ?? $appId;

0 commit comments

Comments
 (0)