engine.php may calculate "short" Hex numbers for colors (eg "0d88") which buggers some browsers

Project:phpAlbum.net
Version:0.4.1-14_fix06
Component:Code
Category:bug
Priority:normal
Assigned:Unassigned
Status:new
Attachment:engine.php_.diffs_.txt (1.12 KB)
Description

Firefox-3.0 issues CSS errors for color settings using "#0d88", and then ignoring that particular CSS rule. It turns out that 'function color_light' in 'engine.php' calculates/creates "0d88" from the Winter theme link_color value "0011aa" times a 0.8 factor. Actually, it calculates a "0,17,170" triplet which gets interpreted as "0d88".

Attached is a "diff" file where I added "if($rgb[x] < 16){$rgb="0" . $rgb;}" for each digit to ensure that a 6-character hexadecimal number will result, thus allowing the associated CSS rule to be used.


style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-8698264690166658"
data-ad-slot="4417389723">