fix: 修正php8.5环境下的警告信息

This commit is contained in:
Anyon 2026-01-03 13:40:48 +08:00
parent 39f021fd88
commit 6bfa89f741
2 changed files with 6 additions and 4 deletions

View File

@ -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));

View File

@ -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;
}
}
}
}