• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC Issue when loading Models

#1
[eluser]jtkendall[/eluser]
Hi, I"m hoping someone who has experience using Modular Extensions - HMVC can help me. I'm trying to load a model and it's throwing an error with the Controller ME requires. The error I'm getting is:

Quote:Fatal error: Cannot access empty property in /Library/WebServer/vhosts/cms/cms/trunk/v1.1/system/application/libraries/Controller.php on line 330

And that line is:

Code:
$this->$_alias = new $model();

I did a simple die($model) before the line and the variable has the correct class name for the model. I'm calling the model using:

Code:
$this->load->model('admin_media_model', '', true);

I've tried it in both the constructor for the controller and in the function I'm calling and both result in the error above. I've also tried moving it out of the models folder in the module and into the default models folder and got the same error.

Any help would be appreciated.

Edit:

Just read through the FAQs on this and they don't use the alias or autoconnect params. Tried it without either and autoloading via the database and it seems to be working.


Messages In This Thread
HMVC Issue when loading Models - by El Forum - 09-05-2008, 04:49 AM
HMVC Issue when loading Models - by El Forum - 09-05-2008, 07:02 AM
HMVC Issue when loading Models - by El Forum - 09-05-2008, 09:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.