fix(plugin): remove stale plugin records when files missing; adjust logging

This commit is contained in:
xboard 2025-09-23 14:59:22 +08:00
parent c9fbd24c58
commit 8176afb073

View File

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