York před 3 roky
rodič
revize
5aa48fca66
1 změnil soubory, kde provedl 1 přidání a 2 odebrání
  1. 1 2
      common/helpers/CaptchaAction.php

+ 1 - 2
common/helpers/CaptchaAction.php

@@ -65,8 +65,7 @@ class CaptchaAction extends \yii\captcha\CaptchaAction
         // 设置文字
         for ($i = 0; $i < $length; ++$i) {
             $fontSize = (int)(rand(26, 32) * $scale * 0.8);
-            //$angle = rand(-10, 10);
-            $angle = rand(-100, 10);
+            $angle = rand(-10, 10);
             $letter = $code[$i];
             $box = imagettftext($image, $fontSize, $angle, $x, $y, $foreColor, $this->fontFile, $letter);
             $x = $box[2] + $this->offset;