Throw an WebColorException if wrong # of hex chars

This commit is contained in:
Zach Copley 2009-06-15 21:21:33 -07:00
parent 2c7f0534ca
commit e7e3709ae0

View File

@ -120,7 +120,8 @@ class WebColor {
$hexcolor[1].$hexcolor[1],
$hexcolor[2].$hexcolor[2]);
} else {
return false;
$errmsg = _('%s is not a valid color! Use 3 or 6 hex chars.');
throw new WebColorException(sprintf($errmsg, $hexcolor));
}
$this->red = hexdec($r);