mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 20:48:09 +08:00
fix: 修正php8.5环境下的警告信息
This commit is contained in:
parent
39f021fd88
commit
6bfa89f741
@ -207,7 +207,7 @@ abstract class Plugin extends Service
|
||||
return app(static::class)->appPath;
|
||||
case 'getappspace':
|
||||
return app(static::class)->appSpace;
|
||||
case 'getapppackage';
|
||||
case 'getapppackage':
|
||||
return app(static::class)->package;
|
||||
default:
|
||||
$class = basename(str_replace('\\', '/', static::class));
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
declare (strict_types=1);
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace think\admin\service;
|
||||
|
||||
@ -152,7 +152,9 @@ class CaptchaService extends Service
|
||||
imagepng($img);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
imagedestroy($img);
|
||||
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||
imagedestroy($img);
|
||||
}
|
||||
return base64_encode($data);
|
||||
}
|
||||
|
||||
@ -182,4 +184,4 @@ class CaptchaService extends Service
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user