I am using Codeigniter message library.
In my controller I have the following code
public function __construct() {
parent::__construct();
$this->load->library('message');
}
public function box($box_id=null, $language_name=null) {
if($id_from_url[5]==null){
$this->message->set('Please provide Box ID in URL.', 'error');
}
}
In my view I use
$this->message->display();
I have already put Message.php in my application/libraries folder
but I am getting the following error
Message: Missing argument 1 for CI_Message::CI_Message(), called in W:\Zend\Apache2\htdocs\mediabox\system\core\Loader.php on line 1099 and defined
Any idea about this error ?
Thanks in advance
Your title is completely different than the error you are getting here. It clearly states that the Message library requires a parameter passed to its construct, but you are loading the library without any construct parameters.
You need to pass the construct parameters using the second parameter while loading it
If you are actually talking about this Message library here http://codeigniter.com/wiki/Message then I must say, the documentation there is incomplete.
The construct here requires a parameter
$configpassed to it.Check the documentation thoroughly. You need to pass this while loading it.
then