Commit 579003ab by callmez

fix #1992: when set yii\captcha\CaptchaValidator::$captchaAction = '/site/captcha'

yii\captcha\CaptchaValidator->createCaptchaAction() error
parent eade9dd1
...@@ -68,7 +68,7 @@ class CaptchaValidator extends Validator ...@@ -68,7 +68,7 @@ class CaptchaValidator extends Validator
*/ */
public function createCaptchaAction() public function createCaptchaAction()
{ {
$ca = Yii::$app->createController($this->captchaAction); $ca = Yii::$app->createController(ltrim($this->captchaAction, '/'));
if ($ca !== false) { if ($ca !== false) {
/** @var \yii\base\Controller $controller */ /** @var \yii\base\Controller $controller */
list($controller, $actionID) = $ca; list($controller, $actionID) = $ca;
......
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