summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/image.php')
-rw-r--r--lib/private/legacy/image.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/legacy/image.php b/lib/private/legacy/image.php
index eeee3b24073..d9af45f2226 100644
--- a/lib/private/legacy/image.php
+++ b/lib/private/legacy/image.php
@@ -785,12 +785,12 @@ class OC_Image implements \OCP\IImage {
break;
case 8:
$color = @unpack('n', $vide . ($data[$p] ?? ''));
- $color[1] = (isset($palette[$color[1] + 1])) ? $palette[$color[1] + 1] : $palette[1];
+ $color[1] = isset($palette[$color[1] + 1]) ? $palette[$color[1] + 1] : $palette[1];
break;
case 4:
$color = @unpack('n', $vide . ($data[floor($p)] ?? ''));
$color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F;
- $color[1] = (isset($palette[$color[1] + 1])) ? $palette[$color[1] + 1] : $palette[1];
+ $color[1] = isset($palette[$color[1] + 1]) ? $palette[$color[1] + 1] : $palette[1];
break;
case 1:
$color = @unpack('n', $vide . ($data[floor($p)] ?? ''));
@@ -820,7 +820,7 @@ class OC_Image implements \OCP\IImage {
$color[1] = ($color[1] & 0x1);
break;
}
- $color[1] = (isset($palette[$color[1] + 1])) ? $palette[$color[1] + 1] : $palette[1];
+ $color[1] = isset($palette[$color[1] + 1]) ? $palette[$color[1] + 1] : $palette[1];
break;
default:
fclose($fh);