I have a little issue with some code that works on development but not on production. It is weird, because all the other code works (or seems to).
The entire error is the following:
Fatal error: Using $this when not in object context in /[snip]/application/modules/manage_plugins/models/Manage_plugins.php on line 6 A PHP Error was encountered
Severity: Error
Message: Using $this when not in object context
Filename: models/Manage_plugins.php
Line Number: 6
Backtrace:
From the other similar issues I could find, it was due to people attempting to use "$this" in a static context - I don't believe that is the case for me.
Here is the manage_plugins constructor, with line 6 (error line) being the first in the constructor:
class Manage_plugins extends CI_Model {
public function __construct() {
$this->mediator->attach("manage_load", function($name, $data) { $this->on_manage_load(); });
$this->load->model("automediator");
}
}
It is being loaded by the following code (and never called explicitly):
$CI =& get_instance();
$CI->load->model("manage_plugins/manage_plugins");
Does anyone know why this is happening?