Skip to content

Commit 40918df

Browse files
committed
1 parent fe237dd commit 40918df

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

app/captcha.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030

3131
/*字体文件位置*/
3232
$fontfile = APP_ROOT . $config['textFont'];
33+
/* floor() 修复php>8.0精度丢失 v2.8.4 */
3334
for ($i = 0; $i < $count; $i++) {
3435
$font_color = imagecolorallocate($img, mt_rand(0, 100), mt_rand(0, 50), mt_rand(0, 255));
3536
imagettftext(
3637
$img,
3738
$font_size,
38-
mt_rand(0, 20) - mt_rand(0, 25),
39-
($img_w * $i / 4) + mt_rand(0, 15),
40-
mt_rand($img_h / 2, $img_h),
39+
floor(mt_rand(0, 20) - mt_rand(0, 25)),
40+
floor($img_w * $i / 4) + floor(mt_rand(0, 15)),
41+
floor(mt_rand($img_h / 2, $img_h)),
4142
$font_color,
4243
realpath($fontfile),
4344
$code[$i]

docs/update.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
* 2024-01-20 v2.8.4
22
- Fix [#163](https://github.com/icret/EasyImages2.0/pull/163)
3-
- 增加检测FTP
3+
- Fix [#159](https://github.com/icret/EasyImages2.0/pull/159)
4+
- 增加上传至FTP
45
- 增加自定义时区
56
- 增加大文件分片上传
67
- 增加重置OPcache缓存

0 commit comments

Comments
 (0)