Welcome Guest, Not a member yet? Register   Sign In
post is non-object
#1

[eluser]louis w[/eluser]
I have two methods in the same controller. Listed right after each other:
Code:
protected function _set_input() {
        $this->input = ($this->input->post('input')) ? $this->input->post('input') : $this->input->get('input');
}
protected function _set_mode() {
        $this->input = ($this->input->post('mode')) ? $this->input->post('mode') : $this->input->get('mode');
}

They are both being called the same way
Code:
$this->_set_input();
$this->_set_mode();

Now here is where it gets weird. It errors on the second one saying
Fatal error: Call to a member function post() on a non-object in ...

If i comment out the first one, it works thou. Seems as if the second time you check the input->post it will trigger the non-object error.

Any idea what this might be?




Theme © iAndrew 2016 - Forum software by © MyBB