mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-28 06:47:24 +08:00
fix(plugin): remove stale plugin records when files missing; adjust logging
This commit is contained in:
@@ -53,7 +53,8 @@ class PluginManager
|
|||||||
if (!class_exists($pluginClass)) {
|
if (!class_exists($pluginClass)) {
|
||||||
$pluginFile = $this->getPluginPath($pluginCode) . '/Plugin.php';
|
$pluginFile = $this->getPluginPath($pluginCode) . '/Plugin.php';
|
||||||
if (!File::exists($pluginFile)) {
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
require_once $pluginFile;
|
require_once $pluginFile;
|
||||||
|
|||||||
Reference in New Issue
Block a user