Tuesday, 20 August 2013

Message: Missing argument 2 for ::__construct(),

Message: Missing argument 2 for ::__construct(),

I have a codeigniter constructor that begins like:
public function __construct($login, $pass)
I'm trying to pass parameters to it in my controller like so:
$params = array(1=>'xxx',2 =>'yyy');
$this->load->library('my_library',$params);
but I'm getting:
Message: Missing argument 2 for my_library::__construct(),
How can I fix this?

No comments:

Post a Comment