Commit ba690d54 by Carsten Brandt

Imagick image can not be converted to string on HHVM

made it consistent with the GD function. See also https://github.com/yiisoft/yii/pull/3406
parent 41cbebf6
......@@ -55,6 +55,7 @@ Yii Framework 2 Change Log
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
- Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue)
- Bug: Fixed Object of class Imagick could not be converted to string in CaptchaAction (eXprojects, cebe)
- Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue)
- Enh #2435: `yii\db\IntegrityException` is now thrown on database integrity errors instead of general `yii\db\Exception` (samdark)
- Enh #2837: Error page now shows arguments in stack trace method calls (samdark)
......
......@@ -247,7 +247,7 @@ class CaptchaAction extends Action
/**
* Renders the CAPTCHA image based on the code using GD library.
* @param string $code the verification code
* @return string image contents
* @return string image contents in PNG format.
*/
protected function renderImageByGD($code)
{
......@@ -300,7 +300,7 @@ class CaptchaAction extends Action
/**
* Renders the CAPTCHA image based on the code using ImageMagick library.
* @param string $code the verification code
* @return \Imagick image instance. Can be used as string. In this case it will contain image contents.
* @return string image contents in PNG format.
*/
protected function renderImageByImagick($code)
{
......@@ -332,8 +332,7 @@ class CaptchaAction extends Action
}
$image->setImageFormat('png');
return $image;
return $image->getImageBlob();
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment