{"record":{"id":"d40b8f39401aa10b","repo":"typecho/typecho","slug":"error-d40b8f","errorCode":null,"errorMessage":"无法禁用插件","messagePattern":"无法禁用插件","errorType":"exception","errorClass":"Typecho\\Widget\\Exception","httpStatus":500,"severity":"error","filePath":"var/Widget/Plugins/Edit.php","lineNumber":229,"sourceCode":"        /** 获取已启用插件 */\n        $plugins = Plugin::export();\n        $activatedPlugins = $plugins['activated'];\n        $pluginFileExist = true;\n\n        try {\n            /** 获取插件入口 */\n            [$pluginFileName, $className] = Plugin::portal($pluginName, $this->options->pluginDir);\n        } catch (Plugin\\Exception $e) {\n            $pluginFileExist = false;\n\n            if (!isset($activatedPlugins[$pluginName])) {\n                throw $e;\n            }\n        }\n\n        /** 判断实例化是否成功 */\n        if (!isset($activatedPlugins[$pluginName])) {\n            throw new Exception(_t('无法禁用插件'), 500);\n        }\n\n        if ($pluginFileExist) {\n\n            /** 载入插件 */\n            require_once $pluginFileName;\n\n            /** 判断实例化是否成功 */\n            if (\n                !isset($activatedPlugins[$pluginName]) || !class_exists($className)\n                || !method_exists($className, 'deactivate')\n            ) {\n                throw new Exception(_t('无法禁用插件'), 500);\n            }\n\n            try {\n                $result = call_user_func([$className, 'deactivate']);\n            } catch (Plugin\\Exception $e) {","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/typecho/typecho/blob/56f4c6f33955a87969c399b5d5912d7f9fd7347c/var/Widget/Plugins/Edit.php#L211-L247","documentation":"Error \"无法禁用插件\" thrown in typecho/typecho.","triggerScenarios":"Thrown at var/Widget/Plugins/Edit.php:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"56f4c6f33955a87969c399b5d5912d7f9fd7347c","analyzedAt":"2026-08-21T01:52:37.175Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}