bcit-ci/CodeIgniter · error · RuntimeException
models/$path$model.php exists, but doesn't declare class $mo
Error message
models/$path$model.php exists, but doesn't declare class $model
What it means
Error "models/$path$model.php exists, but doesn't declare class $model" thrown in bcit-ci/CodeIgniter.
Source
Thrown at system/core/Loader.php:348
log_message('info', config_item('subclass_prefix').'Model class loaded');
}
}
$model = ucfirst($model);
if ( ! class_exists($model, FALSE))
{
foreach ($this->_ci_model_paths as $mod_path)
{
if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
continue;
}
require_once($mod_path.'models/'.$path.$model.'.php');
if ( ! class_exists($model, FALSE))
{
throw new RuntimeException($mod_path."models/".$path.$model.".php exists, but doesn't declare class ".$model);
}
break;
}
if ( ! class_exists($model, FALSE))
{
throw new RuntimeException('Unable to locate the model you have specified: '.$model);
}
}
if ( ! is_subclass_of($model, 'CI_Model'))
{
throw new RuntimeException("Class ".$model." doesn't extend CI_Model");
}
$this->_ci_models[] = $name;
$model = new $model();View on GitHub (pinned to 3658d731ea)
When it happens
Trigger: Thrown at system/core/Loader.php:348 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bcit-ci/CodeIgniter@3658d731ea (2026-08-17).
Data as JSON: /api/errors/ac46dbe19bb15b1a.
Report an issue: GitHub.