Fixing background color

This commit is contained in:
Gregwar
2013-04-22 00:41:07 +02:00
parent 39e2f390f0
commit 7ca6dacb3b
4 changed files with 7 additions and 6 deletions

View File

@ -98,12 +98,12 @@ class CaptchaGenerator
$this->builder->setMaxFrontLines($options['max_front_lines']);
$this->builder->setMaxBehindLines($options['max_behind_lines']);
if ($options['backgroundColor'] != array()) {
if (count($options['backgroundColor'])!=3) {
throw new \RuntimeException('backgroundColor should be an array of r, g and b');
if ($options['background_color'] != array()) {
if (count($options['background_color'])!=3) {
throw new \RuntimeException('background_color should be an array of r, g and b');
}
$color = $options['backgroundColor'];
$color = $options['background_color'];
$this->builder->setBackgroundColor($color[0], $color[1], $color[2]);
}