[eluser]Jack Scott[/eluser]
I just updated my app to DMZ 1.7.0 and ran into a fatal error. I'm not sure if this is a bug or not.
I added a block of code to my DMZ models to auto-load dependent models in the constructor, something like:
Code:
# make sure dependent classes are loaded
foreach (array('has_many', 'has_one') as $type)
{
foreach ($this->{$type} as $model => $properties)
{
$class = $properties['class'];
if (! class_exists($class))
{
$this->CI->load->model($class);
}
}
}
It broke with a
Quote:Fatal error: Uncaught exception 'Exception' with message 'Unable to call the method "_assign_libraries" on the class Rem4_property_file'
message when trying to load a dependent model in the constructor using the code above. I was able to work around the error by changing the _assign_libraries() function definition in datamapper.php. On line 6011, I changed
Code:
protected function _assign_libraries()
to
Code:
function _assign_libraries()
and the problem disappeared. Do you have any idea what happened here? Did I do something wrong?