]> source.dussan.org Git - nextcloud-server.git/commitdiff
getAppValue expects string 35203/head
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>
Thu, 17 Nov 2022 07:03:05 +0000 (08:03 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2022 07:03:05 +0000 (08:03 +0100)
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
lib/private/legacy/OC_Image.php
tests/lib/ImageTest.php

index 22098d7643db45464fc0417b80b7b2c934bbbc3e..b48d13c4d5b9ab2f5d8d26b56e0efc1deefbc71f 100644 (file)
@@ -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));
                }
index dcb09202639c5173a1345c1165249cee6b8f96ef..ace3f1abcec91445b063f72d65ce3416c69d1ca9 100644 (file)
@@ -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')