mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 20:59:12 +08:00
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
This commit is contained in:
@@ -55,6 +55,7 @@ Yii Framework 2 Change Log
|
|||||||
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
|
- 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: 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 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 #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 #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)
|
- 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.
|
* Renders the CAPTCHA image based on the code using GD library.
|
||||||
* @param string $code the verification code
|
* @param string $code the verification code
|
||||||
* @return string image contents
|
* @return string image contents in PNG format.
|
||||||
*/
|
*/
|
||||||
protected function renderImageByGD($code)
|
protected function renderImageByGD($code)
|
||||||
{
|
{
|
||||||
@@ -300,7 +300,7 @@ class CaptchaAction extends Action
|
|||||||
/**
|
/**
|
||||||
* Renders the CAPTCHA image based on the code using ImageMagick library.
|
* Renders the CAPTCHA image based on the code using ImageMagick library.
|
||||||
* @param string $code the verification code
|
* @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)
|
protected function renderImageByImagick($code)
|
||||||
{
|
{
|
||||||
@@ -332,8 +332,7 @@ class CaptchaAction extends Action
|
|||||||
}
|
}
|
||||||
|
|
||||||
$image->setImageFormat('png');
|
$image->setImageFormat('png');
|
||||||
|
return $image->getImageBlob();
|
||||||
return $image;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user