Skip to content

Commit

Permalink
适配php8
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Jan 30, 2023
1 parent aa5487f commit eccd312
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,9 @@ class Config extends SplBean
public $backColor = null; // 背景颜色
public $imageL = null; // 图片宽度
public $imageH = null; // 图片高度
public $fonts = []; // 额外字体
public $fontSize = 25; // 字体大小
public array $fonts = []; // 额外字体
public int $fontSize = 25; // 字体大小
public $mime = MIME::PNG; // 设置类型
public $temp = '/tmp'; // 设置缓存目录

public function setTemp($temp){
if (!is_dir($temp)) mkdir($temp,0755) && chmod($temp,0755);
$this->temp = $temp;
}

/**
* 设置图片格式
Expand Down
1 change: 0 additions & 1 deletion src/VerifyCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function drawCode(string $code): Result
}

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

0 comments on commit eccd312

Please sign in to comment.