Merge pull request #19470 from nextcloud/backport/19465/stable18
[stable18] when we receive intentional empty whats new info, do not try to show it
This commit is contained in:
commit
1bc2b113ca
2 changed files with 9 additions and 1 deletions
|
@ -55,7 +55,11 @@ class ChangesCheck {
|
||||||
public function getChangesForVersion(string $version): array {
|
public function getChangesForVersion(string $version): array {
|
||||||
$version = $this->normalizeVersion($version);
|
$version = $this->normalizeVersion($version);
|
||||||
$changesInfo = $this->mapper->getChanges($version);
|
$changesInfo = $this->mapper->getChanges($version);
|
||||||
return json_decode($changesInfo->getData(), true);
|
$changesData = json_decode($changesInfo->getData(), true);
|
||||||
|
if(empty($changesData)) {
|
||||||
|
throw new DoesNotExistException();
|
||||||
|
}
|
||||||
|
return $changesData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -279,6 +279,10 @@ class ChangesCheckTest extends TestCase {
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
[ # 4 - empty
|
||||||
|
'',
|
||||||
|
[]
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue