philsturgeon / codeigniter-template

Template library for CodeIgniter which supports modules, themes, partial views, etc.
411 stars 178 forks source link

Call to a member function is_mobile() on a non-object #33

Open sevenpixels opened 12 years ago

sevenpixels commented 12 years ago

i'm getting the following error.

PHP Fatal error: Call to a member function is_mobile() on a non-object in /home/sevenpix/public_html/application/libraries/Template.php on line 122

The site loads fine and everything seems to work. So I'm not sure what's up.

craigsansam commented 12 years ago

Hi,

I've been having this error, and I've found a fix for my issue - don't know if it'll help you...

On line 122 it's currently class_exists('CI_User_agent') OR $this->_ci->load->library('user_agent'); I've replaced this with $this->_ci->load->library('user_agent'); and that's it.

Craig

JeffreyDavidson commented 10 years ago

I've ran into this same issue as well from version 1.9 of the template library. That line that craig suggested already exists. Is there any other possible ideas for this.Undefined property: Login::$agent from inside of the template library file is also existent.