From d27a39271e39d043caff3fe4d8538748ca22b18d Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6?= Date: Thu, 17 Nov 2022 08:03:05 +0100 Subject: [PATCH] getAppValue expects string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com> Signed-off-by: John Molakvoæ --- lib/private/legacy/OC_Image.php | 2 +- tests/lib/ImageTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index 22098d7643d..b48d13c4d5b 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -415,7 +415,7 @@ class OC_Image implements \OCP\IImage { * @return int|null */ protected function getJpegQuality() { - $quality = $this->config->getAppValue('preview', 'jpeg_quality', 80); + $quality = $this->config->getAppValue('preview', 'jpeg_quality', '80'); if ($quality !== null) { $quality = min(100, max(10, (int) $quality)); } diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index dcb09202639..ace3f1abcec 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -140,7 +140,7 @@ class ImageTest extends \Test\TestCase { $config = $this->createMock(IConfig::class); $config->expects($this->once()) ->method('getAppValue') - ->with('preview', 'jpeg_quality', 80) + ->with('preview', 'jpeg_quality', '80') ->willReturn(null); $config->expects($this->once()) ->method('getSystemValueInt') -- 2.39.5