mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Fixes #9984: Fixed wrong captcha color in case Imagick is used
This commit is contained in:

committed by
Alexander Makarov

parent
064835b183
commit
d22a689fac
@ -28,6 +28,7 @@ Yii Framework 2 Change Log
|
|||||||
- Bug #9911: Fixed `yii\helpers\BaseStringHelper::explode()` code so it does not remove items eq to 0 with skip_empty attribute (silverfire, kidol)
|
- Bug #9911: Fixed `yii\helpers\BaseStringHelper::explode()` code so it does not remove items eq to 0 with skip_empty attribute (silverfire, kidol)
|
||||||
- Bug #9915: `yii\helpers\ArrayHelper::getValue()` was erroring instead of returning `null` for non-existing object properties (totaldev, samdark)
|
- Bug #9915: `yii\helpers\ArrayHelper::getValue()` was erroring instead of returning `null` for non-existing object properties (totaldev, samdark)
|
||||||
- Bug #9924: Fixed `yii.js` handleAction corrupted parameter values containing quote (") character (silverfire)
|
- Bug #9924: Fixed `yii.js` handleAction corrupted parameter values containing quote (") character (silverfire)
|
||||||
|
- Bug #9984: Fixed wrong captcha color in case Imagick is used (DrDeath72)
|
||||||
- Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark)
|
- Bug: Fixed generation of canonical URLs for `ViewAction` pages (samdark)
|
||||||
- Enh #7341: Client validation now skips disabled inputs (SamMousa)
|
- Enh #7341: Client validation now skips disabled inputs (SamMousa)
|
||||||
- Enh #7581: Added ability to specify range using anonymous function in `RangeValidator` (RomeroMsk)
|
- Enh #7581: Added ability to specify range using anonymous function in `RangeValidator` (RomeroMsk)
|
||||||
|
@ -306,8 +306,8 @@ class CaptchaAction extends Action
|
|||||||
*/
|
*/
|
||||||
protected function renderImageByImagick($code)
|
protected function renderImageByImagick($code)
|
||||||
{
|
{
|
||||||
$backColor = $this->transparent ? new \ImagickPixel('transparent') : new \ImagickPixel('#' . dechex($this->backColor));
|
$backColor = $this->transparent ? new \ImagickPixel('transparent') : new \ImagickPixel('#' . str_pad(dechex($this->backColor), 6, 0, STR_PAD_LEFT));
|
||||||
$foreColor = new \ImagickPixel('#' . dechex($this->foreColor));
|
$foreColor = new \ImagickPixel('#' . str_pad(dechex($this->foreColor), 6, 0, STR_PAD_LEFT));
|
||||||
|
|
||||||
$image = new \Imagick();
|
$image = new \Imagick();
|
||||||
$image->newImage($this->width, $this->height, $backColor);
|
$image->newImage($this->width, $this->height, $backColor);
|
||||||
|
Reference in New Issue
Block a user