Skip to content

Commit eccd312

Browse files
committed
适配php8
1 parent aa5487f commit eccd312

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/Config.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,9 @@ class Config extends SplBean
2828
public $backColor = null; // 背景颜色
2929
public $imageL = null; // 图片宽度
3030
public $imageH = null; // 图片高度
31-
public $fonts = []; // 额外字体
32-
public $fontSize = 25; // 字体大小
31+
public array $fonts = []; // 额外字体
32+
public int $fontSize = 25; // 字体大小
3333
public $mime = MIME::PNG; // 设置类型
34-
public $temp = '/tmp'; // 设置缓存目录
35-
36-
public function setTemp($temp){
37-
if (!is_dir($temp)) mkdir($temp,0755) && chmod($temp,0755);
38-
$this->temp = $temp;
39-
}
4034

4135
/**
4236
* 设置图片格式

src/VerifyCode.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ function drawCode(string $code): Result
6363
}
6464

6565
// 输出验证码结果集
66-
$this->conf->temp = rtrim(str_replace('\\', '/', $this->conf->temp), '/') . '/';
6766
mt_srand();
6867
$func = 'image' . MIME::getExtensionName($this->conf->mime);
6968
ob_start();

0 commit comments

Comments
 (0)