From 8b39e6bca74fd8452a1c74936103c0b35afe7101 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 6 Feb 2021 09:29:31 +0300 Subject: _color_pack: define variable before using --- include/colors.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/colors.php b/include/colors.php index 2ad958e94..408f5aa9d 100644 --- a/include/colors.php +++ b/include/colors.php @@ -216,6 +216,7 @@ function _color_unpack($hex, $normalize = false) { ### Convert an RGB triplet to a hex color. function _color_pack($rgb, $normalize = false) { + $out = 0; foreach ($rgb as $k => $v) { $out |= (($v * ($normalize ? 255 : 1)) << (16 - $k * 8)); }return '#'. str_pad(dechex($out), 6, 0, STR_PAD_LEFT); -- cgit v1.2.3