{"record":{"id":"0c0d2c0a0037f32c","repo":"bcit-ci/CodeIgniter","slug":"the-model-name-you-are-loading-is-the-name-of-a-re","errorCode":null,"errorMessage":"The model name you are loading is the name of a resource that is already being used: $name","messagePattern":"The model name you are loading is the name of a resource that is already being used: \\$name","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/core/Loader.php","lineNumber":283,"sourceCode":"\n\t\t\t// And the model name behind it\n\t\t\t$model = substr($model, $last_slash);\n\t\t}\n\n\t\tif (empty($name))\n\t\t{\n\t\t\t$name = $model;\n\t\t}\n\n\t\tif (in_array($name, $this->_ci_models, TRUE))\n\t\t{\n\t\t\treturn $this;\n\t\t}\n\n\t\t$CI =& get_instance();\n\t\tif (isset($CI->$name))\n\t\t{\n\t\t\tthrow new RuntimeException('The model name you are loading is the name of a resource that is already being used: '.$name);\n\t\t}\n\n\t\tif ($db_conn !== FALSE && ! class_exists('CI_DB', FALSE))\n\t\t{\n\t\t\tif ($db_conn === TRUE)\n\t\t\t{\n\t\t\t\t$db_conn = '';\n\t\t\t}\n\n\t\t\t$this->database($db_conn, FALSE, TRUE);\n\t\t}\n\n\t\t// Note: All of the code under this condition used to be just:\n\t\t//\n\t\t//       load_class('Model', 'core');\n\t\t//\n\t\t//       However, load_class() instantiates classes\n\t\t//       to cache them for later use and that prevents","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/bcit-ci/CodeIgniter/blob/3658d731eaabe6117298a105ffb5b9dd59e190ce/system/core/Loader.php#L265-L301","documentation":"Error \"The model name you are loading is the name of a resource that is already being used: $name\" thrown in bcit-ci/CodeIgniter.","triggerScenarios":"Thrown at system/core/Loader.php:283 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":"3658d731eaabe6117298a105ffb5b9dd59e190ce","analyzedAt":"2026-08-17T02:34:56.929Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}