diff --git a/src/Plugin.php b/src/Plugin.php index 66e7c9df..bdd0ff72 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -207,7 +207,7 @@ public static function __callStatic(string $method, array $arguments) 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)); diff --git a/src/service/CaptchaService.php b/src/service/CaptchaService.php index bceb7fee..c2202044 100644 --- a/src/service/CaptchaService.php +++ b/src/service/CaptchaService.php @@ -152,7 +152,9 @@ private function _image(): string 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); }