Skip to content

Commit d44790d

Browse files
authored
Merge pull request #61007 from nextcloud/fix/theming-cachebuster-type-conflict
fix(theming): read cachebuster as int in manifest endpoint
2 parents 08c92e8 + 17bbc56 commit d44790d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/theming/lib/Controller/ThemingController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public function getThemeStylesheet(string $themeId, bool $plain = false, bool $w
457457
#[BruteForceProtection(action: 'manifest')]
458458
#[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
459459
public function getManifest(string $app): JSONResponse {
460-
$cacheBusterValue = $this->appConfig->getAppValueString('cachebuster', '0');
460+
$cacheBusterValue = (string)$this->appConfig->getAppValueInt('cachebuster');
461461
if ($app === 'core' || $app === 'settings') {
462462
$name = $this->themingDefaults->getName();
463463
$shortName = $this->themingDefaults->getName();

apps/theming/tests/Controller/ThemingControllerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,9 @@ public static function dataGetManifest(): array {
734734
public function testGetManifest(bool $standalone): void {
735735
$this->appConfig
736736
->expects($this->once())
737-
->method('getAppValueString')
738-
->with('cachebuster', '0')
739-
->willReturn('0');
737+
->method('getAppValueInt')
738+
->with('cachebuster')
739+
->willReturn(0);
740740
$this->themingDefaults
741741
->expects($this->any())
742742
->method('getName')

0 commit comments

Comments
 (0)