From bf1234a9c292f5f0cb4e7afc1d4a3787b53ad279 Mon Sep 17 00:00:00 2001 From: xboard Date: Tue, 23 Sep 2025 14:59:22 +0800 Subject: [PATCH] fix(plugin): remove stale plugin records when files missing; adjust logging --- app/Services/Plugin/PluginManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/Plugin/PluginManager.php b/app/Services/Plugin/PluginManager.php index 3efe640..5c3b351 100644 --- a/app/Services/Plugin/PluginManager.php +++ b/app/Services/Plugin/PluginManager.php @@ -53,7 +53,8 @@ class PluginManager if (!class_exists($pluginClass)) { $pluginFile = $this->getPluginPath($pluginCode) . '/Plugin.php'; if (!File::exists($pluginFile)) { - Log::error("Plugin class file not found: {$pluginFile}"); + Log::warning("Plugin class file not found: {$pluginFile}"); + Plugin::query()->where('code', $pluginCode)->delete(); return null; } require_once $pluginFile;