Hi all,
I would like to use a a Model in a module I’m developing for EE 2.0 and have run into a problem. I’ve got the model in the /third_party/my_module/models/ directory and calling it with;
$this->EE->load->model('my_model');in my mcp.my_module.php file. It seems to find the model OK and attempts to load it but then fails with a PHP error;
Fatal error: Class 'Model' not found in /home/xxxx/public_html/system/expressionengine/third_party/my_module/models/my_model.php on line 3My model is:
class My_model extends Model {
function My_model()
{
parent::Model();
}
}Does anyone know what’s up here? Bug in EE or my code…?
Thanks in advance.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.