{"record":{"id":"857c567aa27e82b2","repo":"bcit-ci/CodeIgniter","slug":"class-model-doesn-t-extend-ci-model","errorCode":null,"errorMessage":"Class $model doesn't extend CI_Model","messagePattern":"Class \\$model doesn't extend CI_Model","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/core/Loader.php","lineNumber":362,"sourceCode":"\n\t\t\t\trequire_once($mod_path.'models/'.$path.$model.'.php');\n\t\t\t\tif ( ! class_exists($model, FALSE))\n\t\t\t\t{\n\t\t\t\t\tthrow new RuntimeException($mod_path.\"models/\".$path.$model.\".php exists, but doesn't declare class \".$model);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( ! class_exists($model, FALSE))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Unable to locate the model you have specified: '.$model);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! is_subclass_of($model, 'CI_Model'))\n\t\t{\n\t\t\tthrow new RuntimeException(\"Class \".$model.\" doesn't extend CI_Model\");\n\t\t}\n\n\t\t$this->_ci_models[] = $name;\n\t\t$model = new $model();\n\t\t$CI->$name = $model;\n\t\tlog_message('info', 'Model \"'.get_class($model).'\" initialized');\n\t\treturn $this;\n\t}\n\n\t// --------------------------------------------------------------------\n\n\t/**\n\t * Database Loader\n\t *\n\t * @param\tmixed\t$params\t\tDatabase configuration options\n\t * @param\tbool\t$return \tWhether to return the database object\n\t * @return\tobject|bool\tDatabase object if $return is set to TRUE,\n\t *\t\t\t\t\tFALSE on failure, CI_Loader instance in any other case","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/bcit-ci/CodeIgniter/blob/3658d731eaabe6117298a105ffb5b9dd59e190ce/system/core/Loader.php#L344-L380","documentation":"Error \"Class $model doesn't extend CI_Model\" thrown in bcit-ci/CodeIgniter.","triggerScenarios":"Thrown at system/core/Loader.php:362 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"}