我在我的项目中实现了 cakephp debugkit 插件。在我的 appcontroller.php 文件中,我添加
var $helpers = array('Html', 'Form', 'Paginator', 'Js', 'Session');
public $components = array('DebugKit.Toolbar');
and in before filter i implement
function beforeFilter() {
if ($this->Session->check('GlobalFields')==false) {
$this->Session->write('GlobalFields.tbl_assets.template_information_global', '');
$this->Session->write('GlobalFields.tbl_assets.hilitelibrary', '');
$this->Session->write('GlobalFields.tbl_assets.hilitesortedby', '');
$this->Session->write('GlobalFields.tbl_assets.sc_url_prefix', '');
}
}
but it showing error
Fatal error: Call to a member function check() on a non-object.
and i check that debug($this->Session) returns null.
if i remove public $components = array('DebugKit.Toolbar'); then its run correctly.
but i want to implement that debugkit with session.
请帮我解决这个问题。