mirror of https://github.com/nextcloud/server
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:
parent
0f3150cff7
commit
d27a39271e
|
@ -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…
Reference in New Issue