Welcome Guest, Not a member yet? Register   Sign In
Upgrade to 2.0.1 - Now getting FatalError: Call to a member function ... on a non-object
#1

[eluser]Unknown[/eluser]
Hi all!

I was upgraded CI from 2.0 to 2.0.1 and now when I try to access to any URL to get a 404 Error system drops an error message instead of 404 redirect. The message is:

Fatal Error: Call to a member function xxxxxxxx on a non-object in MY_Controller_Public.php line 15.

In MY_Controller_Public line 15 I've this:

if ($redirect = $this->mdl_redirects->get_by_redirect_from($uri))

And before I load the required model with:

$this->load->model('mdl_redirects');

I can't understand what happening (If I revert to CI 2.0 all works perfectly).

Any help will be appreciated.

Thanks in advance.
#2

[eluser]InsiteFX[/eluser]
When upgrading to CI 2.0 you need to change:

Controller to CI_Controller

And

Model to CI_Model

In all your files, also you need to copy over the new index.php file.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB