Welcome Guest, Not a member yet? Register   Sign In
CI2 to CI3: Call to a member function helper() on a non-object in ...Session.php
#1
Sad 

While migrating from CI 2 to CI 3 I stucked with this error:
Code:
Call to a member function helper() on a non-object in \system\libraries\Session.php

The complete Call Stack:
Code:
# Time Memory Function Location
1 0.0007 377472 {main}( ) ..\index.php:0
2 0.0021 469352 require_once( 'E:\xampp\htdocs\girh_gt\system\core\CodeIgniter.php' ) ..\index.php:292
3 0.0482 4333336 call_user_func_array ( ) ..\CodeIgniter.php:514
4 0.0482 4333504 Controller_A->get_events( ) ..\CodeIgniter.php:514
5 0.0615 6551752 CI_Controller->__construct( ) ..\Controller_A.php:65
6 0.0616 6552504 load_class( ) ..\Controller.php:75
7 0.0617 6554192 CI_Session->__construct( ) ..\Common.php:196

The error is generated from a controller Controller_A like this:

PHP Code:
class Controller_A extends CI_Controller
{
 
 ...
 
 public function get_events()
 
 {
 
   ...
 
   require_once("Plan_Events.php");
 
   $pe = new Plan_Events(); // The line generating the error
 
   ...
 
 

And the Plan_Events class is defined like this (without own constructor):
PHP Code:
class Plan_Events extends CI_Controller { ... } 

¿Any idea? Huh
Reply


Messages In This Thread
CI2 to CI3: Call to a member function helper() on a non-object in ...Session.php - by dimas - 05-29-2015, 03:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB