Skip to content

Commit a8f7598

Browse files
authored
Merge pull request #509 from nextcloud/backport/508/stable31
[stable31] fix: correct env var parsing when there is only one entry
2 parents 9c0e666 + 6eaeb82 commit a8f7598

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Service/ExAppService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,9 @@ public function getAppInfo(string $appId, ?string $infoXml, ?string $jsonInfo, ?
306306
// Advanced deploy options
307307
if (isset($appInfo['external-app']['environment-variables']['variable'])) {
308308
$envVars = [];
309+
if (!isset($appInfo['external-app']['environment-variables']['variable'][0])) {
310+
$appInfo['external-app']['environment-variables']['variable'] = [$appInfo['external-app']['environment-variables']['variable']];
311+
}
309312
foreach ($appInfo['external-app']['environment-variables']['variable'] as $envVar) {
310313
$envVars[$envVar['name']] = [
311314
'name' => $envVar['name'],

0 commit comments

Comments
 (0)