{"issue":{"created_at":"2011-11-29T21:04:09Z","state":"closed","updated_at":"2011-11-29T21:04:15Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","login":"importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"Minor issue: If you look at line 465, you can see that the background color is checking for a string when it is now an array (with the transparency setting), so it will always be passed to compileColor() even with a blank array.\n\nJust deserialize() beforehand and check for strlen on the first array element.\n\n```\n$bgColor = deserialize($row['bgcolor'], true);\n// Try to shorten the definition\nif ($row['bgimage'] \n\n![](= '' && $row['bgposition'] )= '' && $row['bgrepeat'] \n\n![](= '')\n{\n\t$return .= $lb . 'background:' . (($bgColor[0] )= '') ? $this->compileColor($row['bgcolor'], $blnWriteToFile) . ' ' : '') . 'url(\"' . $strGlue . $row['bgimage'] . '\") ' . $row['bgposition'] . ' ' . $row['bgrepeat'] . ';';\n}\nelse\n{\n\t// Background color\n\tif ($bgColor[0] != '')\n\t{\n\t\t$return .= $lb . 'background-color:' . $this->compileColor($row['bgcolor'], $blnWriteToFile) . ';';\n\t}\n```\n\n--- _Originally created by winanscreative on June 25th, 2011, at 07:11pm (ID 3199)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"id":2393026,"number":3199,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/import/labels/backend"},{"name":"Defect","color":"bd2c00","url":"https://api.github.com/repos/contao/import/labels/Defect"}],"title":"[2.10 RC1] StyleSheets.php - Background colors not being parsed correctly with new transparency setting","closed_at":"2011-11-29T21:04:15Z","html_url":"https://github.com/contao/import/issues/3199","url":"https://api.github.com/repos/contao/import/issues/3199","milestone":{"created_at":"2011-11-29T15:29:54Z","state":"closed","due_on":null,"closed_issues":184,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","login":"leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"number":32,"description":"Contao 2.10.0 (minor release)","title":"2.10.0","url":"https://api.github.com/repos/contao/import/milestones/32","open_issues":0}},"action":"closed"}