bcit-ci/CodeIgniter · error · RuntimeException

Unable to locate the model you have specified: $model

Error message

Unable to locate the model you have specified: $model

What it means

Error "Unable to locate the model you have specified: $model" thrown in bcit-ci/CodeIgniter.

Source

Thrown at system/core/Loader.php:356

			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();
		$CI->$name = $model;
		log_message('info', 'Model "'.get_class($model).'" initialized');
		return $this;
	}

	// --------------------------------------------------------------------

	/**

View on GitHub (pinned to 3658d731ea)

When it happens

Trigger: Thrown at system/core/Loader.php:356 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/5a217719d5f8fa99. Report an issue: GitHub.