[Modular Extension] Model bug |
[eluser]grisha[/eluser]
I've tested this on a clean CI 1.7.1 Controller: application/modules/welcome/controllers/welcome.php Code: <?php And the model: Code: <?php Error: Code: A PHP Error was encountered It doesn't matter if the model is in ./system/application/models/TestModel.php or ./system/application/modules/welcome/models/TestModel.php When I print_r($this) after loading the view all I get is: Code: Welcome Object ( [_module:protected] => welcome [_ci_cached_vars] => Array ( ) [_ci_classes] => Array ( ) [load] => Welcome Object *RECURSION* ) Version tested: 5205, 5206 If I'm wrong with something - sorry and please give me an advice, what to do.
[eluser]n0xie[/eluser]
Not a bug, it's a feature From the userguide: Quote:Where Model_name is the name of your class. Class names must have the first letter capitalized with the rest of the name lowercase. Make sure your class extends the base Model class.
[eluser]grisha[/eluser]
I know it is like that. I've changed it from 'TestModel', to 'Test_model', and the result of running the code, is just the same except the model class name in the error shown previously. Controller: Code: <?php Model: Code: <?php When I come back to the typical architecture (that means using app/controllers and app/models without the Modular Extension Libraries) everything works just Fine, and from the Code: print_r($this) Here is the code that I'm talking about. Check it if you can: http://grisha.boo.pl/clean.zip It contains a set up CI 1.7.1 in a folder called 'clean', so just extract it in your document root. |
Welcome Guest, Not a member yet? Register Sign In |