Welcome Guest, Not a member yet? Register   Sign In
My_Model don't auto Load by Core/Loader
#1

Hello,

I use Code Igniter 3.0.4 and I have a class MY_Model.php in repository application/core/ but when i call a model, the class MY_Model don't load.

With Code Igniter 3.0.0 this isn't not a bug !

I saw in the file /system/core/Loader.php at line 315 and there is the expression "require_once .... "  but not the expression new $class(); with in $class = "MY_Model"

I added to the line 320 and it goes !
Code:
$CI->$class = new $class();
My Class "My_Model"  is charged as soon as I call a model extends CI_Model

Can you take into account this modification for next release of Code Igniter 3 ?

Attached Files
.zip   Loader.zip (Size: 8.82 KB / Downloads: 61)
Reply


Messages In This Thread
My_Model don't auto Load by Core/Loader - by Pad - 01-26-2016, 11:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB