General Category > Bug Reports

bug in tinymvc_load.php (model alway load )

(1/1)

ahoangphuc:
file: tynymvc/sysfiles/plugins/tinymvc_load.php

/* model already loaded? silently skip */
   if(isset($this->$model_alias))
    {
        return true;
    }

=>  i realize model always load, "$this->$model_alias" is not right.

Should as:
/*if(isset($this->$model_alias))
    {
        return true;
        //remove this code
    }*/
     
    /* get instance of controller object */
    $controller = tmvc::instance(null,'controller');
   
     /* library already loaded? silently skip */
    if(isset($controller->$model_alias))
      return true //add code for already loaded


mohrt:
It is already this way in the SVN repository. What version are you using?

Navigation

[0] Message Index

Go to full version