diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-19 17:55:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-19 17:55:56 +0200 |
commit | 60be722ee8781d9e94ecc66d62c0e5fcb7e3934e (patch) | |
tree | dd877a701aee73f53b2462fdcd382c290aca2c3e /lib | |
parent | bc2b42250820197c3f71518299c401515f6ee1cc (diff) | |
parent | 27e7332a9c6dca6c5602b025b0880ce46b796ca4 (diff) | |
download | nextcloud-server-60be722ee8781d9e94ecc66d62c0e5fcb7e3934e.tar.gz nextcloud-server-60be722ee8781d9e94ecc66d62c0e5fcb7e3934e.zip |
Merge pull request #22288 from nextcloud/techdebt/noid/fix-oc_image-invalid-scalar-arguments
Cast float/char to int to avoid invalid scalar argument warning
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/OC_Image.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Image.php b/lib/private/legacy/OC_Image.php index 4fdbfb3909f..1e2791f62c9 100644 --- a/lib/private/legacy/OC_Image.php +++ b/lib/private/legacy/OC_Image.php @@ -1175,7 +1175,7 @@ if (!function_exists('imagebmp')) { } elseif ($bit == 32) { $bit = 24; } - $bits = pow(2, $bit); + $bits = (int)pow(2, $bit); imagetruecolortopalette($im, true, $bits); $width = imagesx($im); $height = imagesy($im); @@ -1211,7 +1211,7 @@ if (!function_exists('imagebmp')) { } // RLE8 elseif ($compression == 1 && $bit == 8) { for ($j = $height - 1; $j >= 0; $j--) { - $lastIndex = "\0"; + $lastIndex = 0; $sameNum = 0; for ($i = 0; $i <= $width; $i++) { $index = imagecolorat($im, $i, $j); |