Throw an WebColorException if wrong # of hex chars
This commit is contained in:
parent
2c7f0534ca
commit
e7e3709ae0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user