mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-09 21:28: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;
|
return app(static::class)->appPath;
|
||||||
case 'getappspace':
|
case 'getappspace':
|
||||||
return app(static::class)->appSpace;
|
return app(static::class)->appSpace;
|
||||||
case 'getapppackage';
|
case 'getapppackage':
|
||||||
return app(static::class)->package;
|
return app(static::class)->package;
|
||||||
default:
|
default:
|
||||||
$class = basename(str_replace('\\', '/', static::class));
|
$class = basename(str_replace('\\', '/', static::class));
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
|
// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace think\admin\service;
|
namespace think\admin\service;
|
||||||
|
|
||||||
@ -152,7 +152,9 @@ class CaptchaService extends Service
|
|||||||
imagepng($img);
|
imagepng($img);
|
||||||
$data = ob_get_contents();
|
$data = ob_get_contents();
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
imagedestroy($img);
|
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||||
|
imagedestroy($img);
|
||||||
|
}
|
||||||
return base64_encode($data);
|
return base64_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user