getAppValue expects string

Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
This commit is contained in:
John Molakvoæ 2022-11-17 08:03:05 +01:00 committed by GitHub
parent 0f3150cff7
commit d27a39271e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View 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));
}

View 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')