So here is what I have…
class User_Data extends CI_Model{
var $id,
$first_name,
$last_name,
$name;
public function __construct($init_data) {
parent::__construct();
if(isset($init_data))
{
...
}
My issue is that when I load the model into the controller, it shoots an error:
Message: Missing argument 1 for User_Data::__construct()
But even with the error on load, it does what I want when I create a new instance.
If anyone could lead me in the right direction, that would be awesome.
Thank You
Either remove the argument or set a default value: