getAppValue expects string

Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
pull/35203/head
John Molakvoæ 2 years ago committed by GitHub
parent 0f3150cff7
commit d27a39271e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save