From: John Molakvoæ Date: Thu, 17 Nov 2022 07:03:05 +0000 (+0100) Subject: getAppValue expects string X-Git-Tag: v26.0.0beta1~398^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d27a39271e39d043caff3fe4d8538748ca22b18d;p=nextcloud-server.git getAppValue expects string Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com> Signed-off-by: John Molakvoæ --- 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')